/*
 * ONGestionaView.java
 * Pauliiiiiiiiii
 */

package ongclientejava;

import com.mysql.jdbc.PreparedStatement;
import java.awt.Color;
import java.text.ParseException;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Calendar;
import java.util.StringTokenizer;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import net.exofire.is3ong.AccessMysql;
import java.util.GregorianCalendar;

/**
 * The application's main frame.
 */
public class ONGestionaView extends FrameView {
    
    public static AccessMysql bd;
    static String login = "root";
    static String password = "";
    static String url = "jdbc:mysql://localhost";
    static String nombre_bd = "ong";
    
    public boolean loginCorrecto = false;
    int procResult,estado=0,num,sel,consulta,idp,panel=0,npersonas,nproyectos,naccesos;
    String dni,nombre,ape1,ape2,tlf,email,dni_nuevo,tipo,dir, login_p, pass_p,perfil_p;
    Date fbaja,falta,fnacimiento;
    ResultSet res,res_e,res_p,res_pc, res_soc,res_ong, res_don;
    Object[] option = new Object[2];

    ModeloTabla modelo_personal=new ModeloTabla();
    ResourceMap resourceMap = getResourceMap();

    String nombre_ong,direccion_ong, tlf_ong, email_ong, descripcion_ong, logo_ong;
    
    String usuario, contrasena, perfil;
    enum perfiles {Administrador, Responsable_proyectos, Responsable_personal, Responsable_eventos, No_autorizado};
    
    //-VARIABLES TAREASS-//
    int   idt,idg,filav_tar,filac_tar,estadov_tar,estadoc_tar,filag_tar;
    String nombre_tar,estado_tar,fini_tar,ffin_tar,descripcion_tar,id_tar,director_tar,
            presupuesto_tar,gastos_tar,trabajador_tar,tipo_tar,detalle_tar,id_gasto;
    float presupuestof_tar,gastosf_tar,dinerof_tar;
    double sumgastos_tar;
    Date finid_tar,ffind_tar,fini_trab,ffin_trab;
    Boolean nombreb_tar,presupuestob_tar,descripcionb_tar,voluntariob_tar=false,contratadob_tar=false;
    ModeloTablaPersAsociado modelo_voluntarios= new ModeloTablaPersAsociado();
    ModeloTablaPersAsociado modelo_contratados= new ModeloTablaPersAsociado();
    DefaultTableModel modelo_tareas=new DefaultTableModel();
    DefaultTableModel modelo_gastos=new DefaultTableModel();
    PreparedStatement pstmt;
    
    //-VARIABLES EVENTOSSS-//
    String nombre_e,descripcion_e,responsable_e,lugar_e,tipos_e,estados_e,duracions_e,
            dniresponsable_e,fechaini_e,fechafin_e;
    int tipoi_e,duracion_e,sel_e=-1,estadoi_e,id_e;
    Date finicio_e,ffin_e;
    DefaultTableModel modelo_evento=new DefaultTableModel();
    
    //-VARIABLES PROYECTOS-//
    String nombre_p,descripcion_p,pais_p,categoria_p,entradaDatos,subvencionfila_p,estado_p,
            dniresponsable_p,responsable_p;
    int id_p,id_categoria,estadoindex_p;
    float subvencion_p;
    DefaultTableModel modelo_proyecto=new DefaultTableModel();
    
    Icon icon_nuevo,icon_guardar,icon_buscar,icon_añadir, icon_añadir_grande,icon_cancelar,icon_parar,icon_eliminar,
            icon_iniciar,icon_finalizar, icon_bienvenida,icon_imagen,icon_ong1,icon_ong2;
    
    //-VARIABLES SOCIOS-//
    ModeloTablaSocios modelo_socios = new ModeloTablaSocios();
    DefaultTableModel modelo_pagos = new DefaultTableModel();
    String dni_s, nombre_s,ape1_s, ape2_s,tlf_s, email_s, dni_nuevo_s , dir_s,
            per_s, datos_bancarios_s, forma_pago_s;
    Date fbaja_s, falta_s, fnacimiento_s, fpago_s;
    float cuota_s;
    int nsocios;
    
    //-VARIABLES DONATIVOS-//
    DefaultTableModel modelo_donativos = new DefaultTableModel();
    
    
    String nombreApellidos;
    String nombre_don, ape1_don, ape2_don;
    String dni_d, nombre_d, ape1_d, ape2_d;
    Date fpago_d;
    Float cantidad_d;
    
    //-VARIABLES ONG-//
    String direccion_o, email_o, tlf_o,logo_o,descripcion_o;
    
    
    
    
    
    public ONGestionaView(SingleFrameApplication app) throws Exception {
        
        super(app);
        initComponents();
        
        option[0]="Aceptar";
        option[1]="Cancelar";
        
        modelo_personal.crear_modelo();
        jTPersonal.setModel(modelo_personal);
        jTPersonal.setSelectionMode(javax.swing.JFrame.NORMAL);
        jTPersonal.setDefaultRenderer(Integer.class, new MiRender(dameIconos()));
        
        modelo_voluntarios.crear_modelo();
        jTVoluntarios.setModel(modelo_voluntarios);
        jTVoluntarios.setSelectionMode(javax.swing.JFrame.NORMAL);
        jTVoluntarios.setDefaultRenderer(Integer.class, new MiRender(dameIconos()));
        
        modelo_contratados.crear_modelo();
        jTContratados.setModel(modelo_contratados);
        jTContratados.setSelectionMode(javax.swing.JFrame.NORMAL);
        jTContratados.setDefaultRenderer(Integer.class, new MiRender(dameIconos()));
        
        jPTarCrearModeloGastos();
        jTGastos.setModel(modelo_gastos);
        jTGastos.setSelectionMode(javax.swing.JFrame.NORMAL);
        jPPersonalInactivarBotones();
        
        
        
        
        
        try {
            bd = new AccessMysql(url, nombre_bd, login, password);
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaApp.class.getName()).log(Level.SEVERE, null, ex);
        }        
        
        res=(ResultSet) bd.mostrar_personal(estado);
        try {
            jPPersonalMostrarBusqueda(res);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        jPTarCrearModeloTareas();
        jPTarObtenerTareas();
        
        jPEvenCrear_modelo();
        jTEventos.setModel(modelo_evento);
        jTEventos.setSelectionMode(javax.swing.JFrame.NORMAL);
        jPEvenMostrar();
        jPEvenInactivarBotones();
        
        
        // SOCIOS
        modelo_socios.crear_modelo();
        jTSocSocios.setModel(modelo_socios);
        jTSocSocios.setSelectionMode(javax.swing.JFrame.NORMAL);
        jTSocSocios.setDefaultRenderer(Integer.class, new MiRender(dameIconos()));
        
        jPSocCrearModeloPagos();
        jTSocPagos.setModel(modelo_pagos);
        jTSocPagos.setSelectionMode(javax.swing.JFrame.NORMAL);
        
        // DONATIVOS
        crearModeloDonativos();
        jTDonativos.setModel(modelo_donativos);
        
        
        
        
        jPProCcrearModelo_proyectos();
        jTProyectos.setModel(modelo_proyecto);
        jTProyectos.setSelectionMode(javax.swing.JFrame.NORMAL);
        jPProyMostrar();
        jPProyInactivarBotones();
        
        jPCrear_iconos();
        jPAsignar_iconos();
        
        jPProyAsignarCategorias();
        
        jPBienvObtenerDatos();
        
        // status bar initialization - message timeout, idle icon and busy animation, etc
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            private int busyIconIndex;
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            private int busyIconIndex;
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                }
            }
        });
        
        jPToolbar.setVisible(false);
        jPMain.add(jPLogin, java.awt.BorderLayout.CENTER);
        //jPLogin.add(jIFLogin, new org.netbeans.lib.awtextra.AbsoluteConstraints(mainPanel.getPreferredSize().width/2-150, 
        //                                                                                mainPanel.getPreferredSize().height/2-95, 380, 190));
        jPLogin.setVisible(true);
    }
    
        
    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = ONGestionaApp.getApplication().getMainFrame();
            aboutBox = new ONGestionaAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        ONGestionaApp.getApplication().show(aboutBox);
    }
     @Action
    public void showGastos(){
        if( jDG==null){
            JFrame mainFrame=ONGestionaApp.getApplication().getMainFrame();
            ONGestionaGastos jdg=new ONGestionaGastos(mainFrame,true);
            jDG=new ONGestionaGastos(mainFrame,true);
            jDG.setLocationRelativeTo(mainFrame);
        }
        ONGestionaApp.getApplication().show(jDG);
   }
  
  public int validarDNI(String d){
        int  r=1;
        if(d.length()!=9)
	   r=0;
	else if(d.charAt(8)<'A' || d.charAt(8)>'Z')
	   r=0;
	try{
	   Integer.parseInt(d.substring(0,8));
	}catch(Exception e){
	   r=0;
	}
	      
        return r;
    } 
    
    public int validarEntero(String num){
        int  r=1;
        try{
	   Integer.parseInt(num.substring(0,num.length()-1));
	}catch(Exception e){
	   r=0;
	}
	      
        return r;
    }
    
    public int validarFecha(String f){
        int  r=1;
        if(f.length()!=10)
            r=0;
	else if(f.charAt(4)!='-' || f.charAt(7)!='-')
            r=0;
	try{
	   Integer.parseInt(f.substring(0,3));
           Integer.parseInt(f.substring(5,6));
           Integer.parseInt(f.substring(8,9));
           
	}catch(Exception e){
	   r=0;
	}
        return r;
    } 
       
     
  public void jPONGObtenerDatosFormulario(){
        nombre_ong=jTFONGNombre.getText();
        direccion_ong=jTFONGDireccion.getText();
        tlf_ong=jTFONGTelefono.getText();
        email_ong=jTFONGEmail.getText();
        descripcion_ong=jTAONGDescripcion.getText();
        logo_ong=jTFONGLogo.getText();
    } 
     
    public void jPONGLimpiarFormulario(){
        jTFONGNombre.setText("");
        jTFONGDireccion.setText("");
        jTFONGTelefono.setText("");
        jTFONGEmail.setText("");
        jTAONGDescripcion.setText("");
        jTFONGLogo.setText("");
    } 
     
    public void jPBienvAsignarDatosVar(ResultSet r) throws SQLException{
        if(r.next()){
            nombre_ong=(String) r.getObject("Nombre");
            direccion_ong=(String) r.getObject("Direccion");
            tlf_ong=(String) r.getObject("Telefono");
            email_ong=(String) r.getObject("Email");
            descripcion_ong=(String) r.getObject("Descripcion");
            logo_ong=(String) r.getObject("Logo");
        }
        r.close();
    }
    
    public void jPBienvAsignarVarEtiquetas(){
        jTFBNombre.setText(nombre_ong);
        jTFBDireccion.setText(direccion_ong);
        jTFBTelefono.setText(tlf_ong);
        jTFBEmail.setText(email_ong);
        jTFBDescripcion.setText(descripcion_ong);
    } 
     
    public void jPBienvObtenerDatos(){
        try {
            res_ong = bd.obtenerDatosONG();
            jPBienvAsignarDatosVar(res_ong);
            jPBienvAsignarVarEtiquetas();
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    } 
     
    //-Tareas-//
    public void jPTarCrearModeloTareas() {
        jTTareas.setModel(modelo_tareas);
        modelo_tareas.addColumn("Nombre");
        modelo_tareas.addColumn("Estado");
        modelo_tareas.addColumn("Finicio");
        modelo_tareas.addColumn("Ffin");
        modelo_tareas.addColumn("Presupuesto");
        modelo_tareas.addColumn("Gastos");
        jTTareas.setSelectionMode(javax.swing.JFrame.NORMAL);
    }

    public void jPTarCrearModeloGastos() {
        jTGastos.setModel(modelo_gastos);
        modelo_gastos.addColumn("Detalle");
        modelo_gastos.addColumn("Dinero");
        jTGastos.setSelectionMode(javax.swing.JFrame.NORMAL);
    }

    public String jPTarObtenerDatosFilaVol() throws Exception {
        filav_tar = jTVoluntarios.getSelectedRow();
        if (filav_tar != -1) {
            trabajador_tar = (String) modelo_voluntarios.getValueAt(filav_tar, 1);
            dni = jPTarObtenerNombreApellidos(trabajador_tar);
            return dni;
        } else {
            return null;
        }
    }

    public String jPTarObtenerDatosFilaCont() throws Exception {
        filac_tar = jTContratados.getSelectedRow();
        if (filac_tar != -1) {
            trabajador_tar = (String) modelo_contratados.getValueAt(filac_tar, 1);
            dni = jPTarObtenerNombreApellidos(trabajador_tar);
            return dni;
        } else {
            return null;
        }
    }

    public int jPTarObtenerDatosFilaGastos() throws Exception {
        filag_tar = jTGastos.getSelectedRow();
        if (filag_tar != -1) {
            detalle_tar = (String) modelo_gastos.getValueAt(filag_tar, 0);
            dinerof_tar = (Float) modelo_gastos.getValueAt(filag_tar, 1);
            idg = jPTarObtenerIDGasto(detalle_tar, dinerof_tar);
            return idg;
        } else {
            return -1;
        }
    }

    public int jPTarObtenerIDGasto(String detalle_tar, float dinerof_tar) throws Exception {
        res = (ResultSet) bd.obtener_IDgasto(detalle_tar, dinerof_tar);
        if (res.next()) {
            id_gasto = res.getString("IDgasto");
            idg = Integer.valueOf(id_gasto).intValue();
        
        }
        return idg;
    }

    public void jPTarObtenerDatosFila() {
        sel = jTTareas.getSelectedRow();
        if (sel != -1) {
            nombre_tar = (String) modelo_tareas.getValueAt(sel, 0);
            estado_tar = (String) modelo_tareas.getValueAt(sel, 1);
            finid_tar = (Date) modelo_tareas.getValueAt(sel, 2);
            if (finid_tar == null) {
                fini_tar = null;
            } else {
                fini_tar = finid_tar.toString();
            }
            ffind_tar = (Date) modelo_tareas.getValueAt(sel, 3);
            if (ffind_tar == null) {
                ffin_tar = null;
            } else {
                ffin_tar = ffind_tar.toString();
            }
            presupuestof_tar = (Float) modelo_tareas.getValueAt(sel, 4);
            if (modelo_tareas.getValueAt(sel, 5) == null) {
                gastos_tar = null;
            } else {
                sumgastos_tar=(Double)modelo_tareas.getValueAt(sel, 5);
            }
        } else {
            //System.out.println("No hay una tarea seleccionada");
        }
    }

    public void jPTarObtenerIdtarea() throws Exception {
        res = (ResultSet) bd.obtener_idtarea(nombre_tar, estado_tar, descripcion_tar, presupuestof_tar);
        if (res.next()) {
            id_tar = res.getString("IDtarea");
        }

    }

    public String jPTarObtenerSumaGastos(int idt) throws Exception{
        String suma="0";
        res=bd.obtener_suma_gastos(idt);
        if (res.next()){
            suma=res.getString("SUM(Cantidad)");
            
       }
        res.close();
        return suma;
    }
                       
    public void jPTarObtenerTareas() throws Exception {
        idp = id_p;
        res = (ResultSet) bd.obtener_tareasProyecto(idp);
        jPTarMostrarTablaTareas(res);
    }

    public void jPTarObtenerGastosTarea(int idt) throws Exception {
        res = bd.obtener_gastos_tarea(idt);
        jPTarMostrarTablaGastos(res);
    }

    public void jPTarObtenerTrabajadorTarea(int idt) throws Exception {
        res = bd.obtener_trabajadorTarea(idt);
        jTGastos.updateUI();
        jPTarMostrarDatosTrabajador(res);
    }

    public void jPTarMostrarTablaGastos(ResultSet r) throws SQLException {
         modelo_gastos.getDataVector().clear();
        jTGastos.updateUI();
        while (r.next()) {
            Object[] fila = new Object[2];
            detalle_tar = (String) r.getObject("Descripcion");
            dinerof_tar = r.getFloat("Cantidad");
            idg = (int) r.getLong("IDgasto");
            if (detalle_tar == null) {
                fila[0] = "";
            } else {
                fila[0] = detalle_tar;
            }
            fila[1] = dinerof_tar;
            modelo_gastos.addRow(fila);
        }
        r.close();
    }

    public void jPTarMostrarTablaTareas(ResultSet r) throws SQLException, Exception {
        modelo_tareas.getDataVector().clear();
        while (r.next()) {
            Object[] fila = new Object[6];
            id_tar = r.getString("IDtarea");
            idt = Integer.valueOf(id_tar).intValue();
            fila[0] = r.getObject("Nombre");
            fila[1] = r.getObject("Estado");
            fila[2] = r.getObject("Fecha_inicio");
            fila[3] = r.getObject("Fecha_fin");
            fila[4] = r.getObject("Presupuesto");
            String consulta = "SELECT IDtarea,SUM(Cantidad) FROM gastos WHERE IDtarea='" + idt + "'" +
                    "GROUP BY IDtarea ;";
            pstmt = (PreparedStatement) bd.prepararStatement(consulta);
            ResultSet res = pstmt.executeQuery();
            if (res.next()) {
                fila[5] = res.getObject("SUM(Cantidad)");
            }
            res.close();

            modelo_tareas.addRow(fila); // Añade una fila al final    
        }
        r.close();

    }

    public void jPTarLimpiarDatos() {
        jTFTarDirector.setText("");
        jTFTarNombre.setText("");
        jTFTarPresupuesto.setText("");
        jTFTarDescripcion.setText("");
    }

    public void jPTarObtenerDatosFormulario() {
        String pres;
        nombreb_tar = true;
        presupuestob_tar = true;
        descripcionb_tar = true;

        nombre_tar = jTFTarNombre.getText();
        if (nombre_tar.isEmpty()) {
            nombreb_tar = false;
        }
        presupuesto_tar = jTFTarPresupuesto.getText();
        if (presupuesto_tar.isEmpty()) {
            presupuestob_tar = false;
            pres = "0";
            presupuestof_tar = Float.valueOf(pres).floatValue();
        } else { //Comprobar que hemos metido un numero en vez de un String
            presupuestof_tar = Float.valueOf(presupuesto_tar).floatValue();
            if (presupuestof_tar < 0) {
                pres = "0";
                presupuestof_tar = Float.valueOf(pres).floatValue();
                jTFTarPresupuesto.setText("0");
            }
        }
        descripcion_tar = jTFTarDescripcion.getText();
        if (descripcion_tar.isEmpty()) {
            
            descripcionb_tar = false;
        }


    }

    public void jPTarMostrarDescripcion() throws Exception {
        idt = Integer.valueOf(id_tar).intValue();
        res = (ResultSet) bd.obtener_descripcionTarea(idt);
        if (res.next()) {
            descripcion_tar = res.getString("Descripcion");
        }
        jTFTarDescripcion.setText(descripcion_tar);
    }

    public void jPTarMostrarDirector() throws Exception {
        idt = Integer.valueOf(id_tar).intValue();
        res = (ResultSet) bd.obtener_dniTarea(idt);
        if (res.next()) {
            dni = res.getString("DNI");
            res = (ResultSet) bd.obtener_datosDni(dni);
            if (res.next()) {
                nombre = res.getString("Nombre");
                ape1 = res.getString("Apellido1");
                ape2 = res.getString("Apellido2");
                jTFTarDirector.setText(nombre + " " + ape1 + " " + ape2);
            }
        } else {//La tarea no tiene director
            jTFTarDirector.setText("");
        }
    }

    public void jPTarMostrarDatosFormulario() throws Exception {
        jPTarActivarBotonesFormulario();
        jPTarObtenerDatosFila();
        jTFTarNombre.setText(nombre_tar);
        String s = String.valueOf(presupuestof_tar);
        jTFTarPresupuesto.setText(s);
        jPTarObtenerIdtarea();
        jPTarMostrarDirector();
        jPTarMostrarDescripcion();
    }

    public void jPTarFijarDirector() throws Exception {


    // En primer lugar Elejimos un director de la tabla personal


    }

    public void jPTarLimpiarModeloTablas() {
        modelo_contratados.getDataVector().clear();
        modelo_voluntarios.getDataVector().clear();
        modelo_gastos.getDataVector().clear();
    }

    public void jPTarActivarBotonesFormulario() {
        jBTarNuevo.setEnabled(true);
        jBTarGuardar.setEnabled(true);
    }

    public void jPTarOcultarBotonesFormulario() {
        jBTarNuevo.setEnabled(false);
        jPTarOcultarBotonGuardar();
    }

    public void jPTarOcultarBotonGuardar() {
        jBTarGuardar.setEnabled(false);
    }

    public void jPTarActivarBotonesTareas() {
        jPTarActivarBotonIniciar();
        jPTarActivarBotonFinalizar();

    }

    public void jPTarActivarBotonEliminar() {
        jBTarEliminar.setEnabled(true);
    }

    public void jPTarOcultarBotonEliminar() {
        jBTarEliminar.setEnabled(false);
    }

    public void jPTarOcultarBotonesTareas() {
        jPTarOcultarBotonIniciar();
        jPTarOcultarBotonFinalizar();
        jBTarEliminar.setEnabled(false);
    }

    public void jPTarActivarBotonesPTarea() {
        jBTarAñadirVoluntario.setEnabled(true);
        jBTarFinalizarVoluntario.setEnabled(true);
        jBTarAñadirContratado.setEnabled(true);
        jBTarFinalizarContratado.setEnabled(true);
        jBTarFijarDirector.setEnabled(true);
    }

    public void jPTarOcultarBotonesPTarea() {
        jBTarAñadirVoluntario.setEnabled(false);
        jBTarFinalizarVoluntario.setEnabled(false);
        jBTarAñadirContratado.setEnabled(false);
        jBTarFinalizarContratado.setEnabled(false);
        jBTarFijarDirector.setEnabled(false);
    }

    public void jPTarActivarBotonesGTarea() {
        jBTarAñadirGasto.setEnabled(true);
        jBTarEliminarGasto.setEnabled(true);
    }

    public void jPTarOcultarBotonesGTarea() {
        jBTarAñadirGasto.setEnabled(false);
        jBTarEliminarGasto.setEnabled(false);
    }

    public void jPTarActivarBotonIniciar() {
        jBTarIniciar.setEnabled(true);
    }

    public void jPTarOcultarBotonIniciar() {
        jBTarIniciar.setEnabled(false);
    }

    public void jPTarActivarBotonFinalizar() {
        jBTarFinalizar.setEnabled(true);
    }

    public void jPTarOcultarBotonFinalizar() {
        jBTarFinalizar.setEnabled(false);
    }

    public void jPTarMostrarDatosTrabajador(ResultSet res) throws SQLException, Exception {
        modelo_voluntarios.getDataVector().clear();
        modelo_contratados.getDataVector().clear();
        jTVoluntarios.updateUI();
        jTContratados.updateUI();
        while (res.next()) {
            Object[] fila = new Object[2];
            dni = res.getString("DNI");
            fini_trab = res.getDate("Fecha_inicio");
            ffin_trab = res.getDate("Fecha_fin");
            tipo = res.getString("Tipo");
            String consulta = "SELECT Nombre,Apellido1,Apellido2 FROM personal WHERE DNI='" + dni + "';";
            pstmt = (PreparedStatement) bd.prepararStatement(consulta);
            ResultSet result = pstmt.executeQuery();
            while (result.next()) {
                nombre = result.getString("Nombre");
                ape1 = result.getString("Apellido1");
                ape2 = result.getString("Apellido2");
                trabajador_tar = nombre + " " + ape1 + " " + ape2;
                if (ffin_trab == null) {
                    fila[0] = 0;
                } else {
                    fila[0] = 1;
                }
                fila[1] = trabajador_tar;
                if (tipo.equals("Contratado")) {
                    modelo_contratados.addRow(fila);
                } else if (tipo.equals("Voluntario")) {
                    modelo_voluntarios.addRow(fila);
                }
            }
            result.close();
        }
        res.close();
    }

    public String jPTarObtenerNombreApellidos(String tr) throws Exception {
        //Cojemos por separado su nombre y apellidos para obtener su dni
        //System.out.println("Datos personall-> "+tr);
        StringTokenizer tokens = new StringTokenizer(tr);
        String[] aux = new String[3];
        int i = 0;
        while (tokens.hasMoreTokens()) {
            aux[i] = tokens.nextToken();
            i++;
        }
        
        nombre = aux[0];
        ape1 = aux[1];
        ape2 = aux[2];
        //Obtenemos el dni de la persona en la tabla personal
        bd.obtener_datosFilaNA(nombre,ape1,ape2);
        res = (ResultSet) bd.getResultSentence();
        if (res.next()) {
            dni = res.getString("DNI");
        }
        return dni;
    }

    public void jPTarAñadirPersonalTarea(int tipo) throws SQLException, Exception {
        if (tipo == 1) {
            tipo_tar = "Voluntario";
        } else {
            tipo_tar = "Contratado";
        }
        bd.procedureTrabajaPersonalTarea(idt, dni, tipo_tar);
        procResult = bd.getResultProcedure();
        if (procResult == 1) {
            res = bd.obtener_trabajadorTarea(idt);
            jPTarMostrarDatosTrabajador(res);
        }
        if (procResult == -1) {
            JOptionPane.showMessageDialog(jTPTareas, "El " + tipo_tar + " " + trabajador_tar + " no ha sido asignado a la tarea" + idt, "ERROR", JOptionPane.ERROR_MESSAGE);
        }
        if (procResult == -2) {
            JOptionPane.showMessageDialog(jTPTareas, "El " + tipo_tar + " " + trabajador_tar + " ya esta trabajando en la tarea" + idt, "AVISO", JOptionPane.WARNING_MESSAGE);
        }
        if (procResult == -3) {
            JOptionPane.showMessageDialog(jTPTareas, "El " + tipo_tar + " " + trabajador_tar + " no se encuentra en la Base de Datos" + idt, "ERROR", JOptionPane.WARNING_MESSAGE);
        }
        if (procResult == 0) {
            JOptionPane.showMessageDialog(jTPTareas, "La tarea " + idt + " esta 'Finalizada' o 'Cancelada' ", "ERROR", JOptionPane.WARNING_MESSAGE);
        }
    }

    
  
    //-PROYECTOSSS-//
    public void jPProyActivarBotones(){
        jBProyNuevo.setEnabled(true);
        jBProyBuscar.setEnabled(true);
        jBProyGuardar.setEnabled(true);
        jBProyFijarResponsable.setEnabled(true);
    }
    
    public void jPProyInactivarBotones(){
        jBProyNuevo.setEnabled(false);
        jBProyBuscar.setEnabled(false);
        jBProyGuardar.setEnabled(false);
        jBProyEliminar.setEnabled(false);
        
        jBProyCambiarEstado.setEnabled(false);
        jBProyFijarResponsable.setEnabled(false);
        jBProyAñadirImagen.setEnabled(false);
        jBProyEliminarImagen.setEnabled(false);
    }
    
    public void jPProyObtenerDatosProyectoModelo() throws SQLException, Exception{
        bd.jPProyObtenerDatosFilaModelo(nombre_p);
        res_p=bd.getResultSentence();
        if(res_p.next()){
            id_p=Integer.valueOf(res_p.getObject("IDproyecto").toString());
            id_categoria=Integer.valueOf(res_p.getObject("IDcategoria").toString());
            pais_p=(String) res_p.getObject("Pais");
            descripcion_p=(String) res_p.getObject("Descripcion");
            estado_p=(String) res_p.getObject("Estado");
       }
       categoria_p=bd.procedureObtenerNombreCategoria(id_categoria);
       dniresponsable_p=bd.jPProyObtenerDniResponsable(id_p);
       if(!dniresponsable_p.isEmpty()){
            bd.procedureBuscarPersonalDNI(dniresponsable_p);
            procResult = bd.getResultProcedure();
            if (procResult == 1) {
                res = (ResultSet) bd.obtener_datosDni(dniresponsable_p);
                if(res.next())
                    responsable_p=res.getObject("Nombre").toString()+" "+res.getObject("Apellido1").toString()+" "+res.getObject("apellido2").toString();
            } 
        }else
            responsable_p="";
    }
    
    public void jPProyRellenarFormulario(){
        jTFProyNombre.setText(nombre_p);
        jTFProySubvencion.setText(subvencionfila_p);
        jTFProyPais.setText(pais_p);
        jCBProyEstado.setSelectedItem(estado_p);
        jCBProyCategoria.setSelectedItem(categoria_p);
        jTAProyDescripcion.setText(descripcion_p);
        jTFProyResponsable.setText(responsable_p);
    }
    public void jPProyObtenerDatosModelo(){
        nombre_p=(String) modelo_proyecto.getValueAt(sel, 0);
        if(modelo_proyecto.getValueAt(sel, 2)==null){
            subvencion_p=(float) 0.0;
        }
        else{
            subvencionfila_p=modelo_proyecto.getValueAt(sel, 2).toString();
            subvencion_p=Float.valueOf(subvencionfila_p).floatValue();
        }
    }
    
    public void jPProyObtenerDatosFormulario(){
        nombre_p=jTFProyNombre.getText();
        pais_p=jTFProyPais.getText();
        estado_p=(String) jCBProyEstado.getSelectedItem();
        estadoindex_p=jCBProyEstado.getSelectedIndex();
        id_categoria=jCBProyCategoria.getSelectedIndex();
        //if(id_categoria!=-1)
        categoria_p=(String) jCBProyCategoria.getSelectedItem();
        if(!jTFProySubvencion.getText().isEmpty())
        {subvencion_p=Float.valueOf(jTFProySubvencion.getText().toString());}
        descripcion_p=jTAProyDescripcion.getText();
    }
    
    public void jPProyMostrarCategorias(ResultSet r) throws SQLException{
        jCBProyCategoria.removeAllItems();
        jCBProyCategoria.addItem("");
        jCBProyCategoria2.removeAllItems();
        while(r.next()){
            Object fila = new Object();
            fila = r.getObject("Nombre");
            jCBProyCategoria2.addItem(fila);
            jCBProyCategoria.addItem(fila);
        }
        r.close();
    }
    public void jPProyAsignarCategorias(){
        try {
            res_pc = bd.jPProyObtener_categorias();
            jPProyMostrarCategorias(res_pc);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
    
    public void jPProyMostrar(){
        try {
            res_p = bd.obtener_proyectos();
            jPProyMostrarProyectos(res_p);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void jPProCcrearModelo_proyectos(){
        modelo_proyecto.addColumn("NOMBRE");
        modelo_proyecto.addColumn("COSTE");
        modelo_proyecto.addColumn("SUBVENCIÓN");
        modelo_proyecto.addColumn("FINICIO");
        modelo_proyecto.addColumn("FFIN");
    }
    
    public void jPProyMostrarProyectos(ResultSet r) throws SQLException{
        modelo_proyecto.getDataVector().clear();
        nproyectos=0;
        while (r.next()) {
            Object[] fila = new Object[5];
            fila[0] = r.getObject("Nombre");
            fila[1] = r.getObject("Coste_total");
            fila[2] = r.getObject("Subvencion");
            fila[3] = r.getObject("Fecha_inicio");
            fila[4] = r.getObject("Fecha_fin");
            modelo_proyecto.addRow(fila); // Añade una fila al final
            nproyectos++;
        }
        r.close();
    }

    public void jPProyLimpiar_formulario(){
        jTFProyNombre.setText("");
        jTFProyPais.setText("");
        jCBProyEstado.setSelectedIndex(0);
        jCBProyCategoria.setSelectedIndex(0);
        jTAProyDescripcion.setText("");
        jTFProySubvencion.setText("");
        jTFProyResponsable.setText("");
    }
    
    //-EVENTOS-//
public void jPCrear_iconos(){
        icon_nuevo = new ImageIcon (getClass().getResource("/ongclientejava/resources/filenew.png"));
        icon_guardar = new ImageIcon (getClass().getResource("/ongclientejava/resources/filesave.png"));
        icon_buscar = new ImageIcon (getClass().getResource("/ongclientejava/resources/search.png"));
        icon_añadir = new ImageIcon (getClass().getResource("/ongclientejava/resources/ok.png"));
        icon_añadir_grande = new ImageIcon (getClass().getResource("/ongclientejava/resources/button_ok22.png"));
        icon_cancelar = new ImageIcon (getClass().getResource("/ongclientejava/resources/button_cancel22.png"));
        icon_parar = new ImageIcon (getClass().getResource("/ongclientejava/resources/stop.png"));
        icon_eliminar = new ImageIcon (getClass().getResource("/ongclientejava/resources/remove.png"));
        icon_iniciar = new ImageIcon (getClass().getResource("/ongclientejava/resources/player_play.png"));
        icon_finalizar = new ImageIcon (getClass().getResource("/ongclientejava/resources/player_stop.png"));
        icon_bienvenida = new ImageIcon (getClass().getResource("/ongclientejava/resources/ong bienvenida.jpg"));
        icon_imagen = new ImageIcon (getClass().getResource("/ongclientejava/resources/ong.jpg"));
        icon_ong1 = new ImageIcon (getClass().getResource("/ongclientejava/resources/ong1.jpg"));
        icon_ong2 = new ImageIcon (getClass().getResource("/ongclientejava/resources/ong2.jpg"));
    }
    
    public void jPAsignar_iconos(){
        jBPersNuevo.setIcon(icon_nuevo);
        jBPersGuardar.setIcon(icon_guardar);
        jBPersBuscar.setIcon(icon_buscar);
        jBPersBaja.setIcon(icon_cancelar);
        
        jBEvenNuevo.setIcon(icon_nuevo);
        jBEvenGuardar.setIcon(icon_guardar);
        jBEvenBuscar.setIcon(icon_buscar);
        jBEvenCancelar.setIcon(icon_cancelar);
        
        jBProyNuevo.setIcon(icon_nuevo);
        jBProyGuardar.setIcon(icon_guardar);
        jBProyBuscar.setIcon(icon_buscar);
        jBProyEliminar.setIcon(icon_cancelar);
        
        jBProyAñadirImagen.setIcon(icon_añadir);
        jBProyEliminarImagen.setIcon(icon_eliminar);
        jBProyAñadirCategoria.setIcon(icon_añadir);
        jBProyEliminarCategoria.setIcon(icon_eliminar);
        
        
        jBTarAñadirContratado.setIcon(icon_añadir);
        jBTarFinalizarContratado.setIcon(icon_eliminar);
        jBTarAñadirVoluntario.setIcon(icon_añadir);
        jBTarFinalizarVoluntario.setIcon(icon_eliminar);
        jBTarAñadirGasto.setIcon(icon_añadir);
        jBTarEliminarGasto.setIcon(icon_eliminar);
        jBTarNuevo.setIcon(icon_nuevo);
        jBTarGuardar.setIcon(icon_guardar);
        
        jBTarIniciar.setIcon(icon_iniciar);
        jBTarFinalizar.setIcon(icon_finalizar);
        jBTarEliminar.setIcon(icon_cancelar);
        
        //jLBienvLogo.setIcon(icon_bienvenida);
        jBONGLimpiar.setIcon(icon_nuevo);
        jBONGGuardar.setIcon(icon_guardar);
        jLProyImagen.setIcon(icon_imagen);
        
        jLONGImagen.setIcon(icon_ong1);
        
        jLONGImagen1.setIcon(icon_bienvenida);
    }
    
    public void jPEvenActivar_guardar() {
        jBEvenGuardar.setEnabled(true);
    }

    public void jPEvenActivar_buscar() {
        jBEvenBuscar.setEnabled(true);

    }

    public void jPEvenActivar_nuevo() {
        jBEvenNuevo.setEnabled(true);
    }

    public void jPEvenActivarBotones() {
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
        jBEvenCancelar.setEnabled(true);
        jBEvenFijarResponsable.setEnabled(true);
    }
    // public void jPEvenActivarFijarResponsable(){
    //     jBEvenFijarResponsable.setEnabled(true);
    // }
    public void jPEvenInactivarBotones() {
        jBEvenNuevo.setEnabled(false);
        jBEvenGuardar.setEnabled(false);
        jBEvenBuscar.setEnabled(false);
        jBEvenCancelar.setEnabled(false);
        jBEvenFijarResponsable.setEnabled(false);

    }
    // public void jPEvenInactivarFijarResponsable(){
    //     jBEvenFijarResponsable.setEnabled(false);
    //}
    public void jPEvenMostrar() throws SQLException {
        bd.procedureFinalizarEventos();
        procResult = bd.getResultProcedure();
        if (procResult == 1){
           //System.out.println("Los eventos se han finalizado");
        }else{
            //System.out.println("Ningun Evento se ha finalizado");
        }res_e = bd.jPEvenMostrarEventos();
        try {
            jPEvenMostrarBusqueda(res_e);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void jPEvenLimpiarFormulario() {
        jTFEvenNombre.setText("");
        jTFEvenDuracion.setText("");
        jTFEvenLugar.setText("");
        jFTFEvenFechaInicio.setText("");
        jFTFEvenFechaFin.setText("");
        jTAEvenDescripcion.setText("");
        jTFEvenResponsable.setText("");
        jCBEvenTipo.setSelectedIndex(0);
        jCBEvenEstado.setSelectedIndex(0);
        responsable_e = "";
    }

    public void jPEvenObtenerDatos() throws ParseException {

        nombre_e = jTFEvenNombre.getText();
        tipoi_e = jCBEvenTipo.getSelectedIndex();
        tipos_e = (String) jCBEvenTipo.getSelectedItem();
        estadoi_e = jCBEvenEstado.getSelectedIndex();
        estados_e = (String) jCBEvenEstado.getSelectedItem();
        lugar_e = jTFEvenLugar.getText();
        //Si el campo duracion está relleno y contiene a un entero,lo convertimos a Integer

        String dur = jTFEvenDuracion.getText();
        if (!dur.isEmpty()) {
            duracion_e = Integer.valueOf(dur).intValue();
            //System.out.println("La clase de la duracion es: " + dur.getClass());
        } else {
            duracion_e = -1;
        }

        // if(duracion_e <=0 && !(finicio_e.toString().isEmpty()) && (!fechafin_e.isEmpty())) {

        fechaini_e = jFTFEvenFechaInicio.getText();
        if (!fechaini_e.isEmpty()) {
            finicio_e = Date.valueOf(fechaini_e);
            ffin_e = finicio_e;

            //Obtengo una instancia de la Clase Calendar
            Calendar c = Calendar.getInstance();
            //Le asigno la fecha de inicio
            c.setTime(finicio_e);
            //Obtenemos el dia, la fecha y el año de la fecha de inicio
            int dia = c.get(Calendar.DATE);
            int mes = c.get(Calendar.MONTH);
            int anio = c.get(Calendar.YEAR);
            //System.out.println("La fecha de Inicio es Dia: " + dia + " Mes: " + mes + " Año: " + anio);
            //Sumo tantos dias a la fecha de inicio, como me indica el campo duracion
            c.add(Calendar.DATE, duracion_e);
            //Obtengo la nueva fecha
            dia = c.get(Calendar.DATE);
            //Le sumo 1 al mes, porque estan representados del 0 al 11
            mes = c.get(Calendar.MONTH) + 1;
            anio = c.get(Calendar.YEAR);

            String dia_fecha = "" + dia;
            String mes_fecha = "" + mes;

            if (dia < 10) {
                dia_fecha = "0" + dia_fecha;
            }
            if (mes < 10) {
                mes_fecha = "0" + mes_fecha;
            }

            //System.out.println("La fecha de Fin es Dia: " + dia_fecha + " Mes: " + mes_fecha + " Año: " + anio);
            //Creo un nuevo String para almacenar la fecha_fin
            fechafin_e = anio + "-" + mes_fecha + "-" + dia_fecha;
            //System.out.println("La fecha de fin es: " + fechafin_e);

            //   String fecha = "01/04/1998"; // dd/MM/yyyy

            //creo un simpledate format con el mismo formato del String
            //@param pformat ej. "yyyy-mm-dd"
            //SimpleDateFormat sdf = new SimpleDateFormat("yyyy'-'mm'-'dd");
            //hago el parse y lo convierto el String a Date
            ffin_e=Date.valueOf(fechafin_e);

            //Introduzco la fecha creada en el formulario
            jFTFEvenFechaFin.setText(fechafin_e);
        }
        descripcion_e = jTAEvenDescripcion.getText();
        responsable_e = jTFEvenResponsable.getText();

        //System.out.println("Los datos obtenidos son: Nombre: " + nombre_e + " Tipo: " + tipos_e + " Estado: " + estados_e + " Lugar: " + lugar_e +
        //        " Duracion: " + duracion_e + " Fecha de Inicio: " + finicio_e +
        //        " Fecha de Fin: " + ffin_e + " Descripcion: " + descripcion_e +
        //        " Responsable: " + responsable_e);
    }

    public void jPEvenCrear_modelo() {
        modelo_evento.addColumn("NOMBRE");
        modelo_evento.addColumn("TIPO");
        modelo_evento.addColumn("ESTADO");
        modelo_evento.addColumn("LUGAR");
        modelo_evento.addColumn("DURACION");
        modelo_evento.addColumn("F.INICIO");
        modelo_evento.addColumn("F.FIN");
    }

    public int jPEvenMostrarBusqueda(ResultSet r) throws SQLException {
        modelo_evento.getDataVector().clear();
        int contador = 0;
        while (r.next()) {
            contador++;
            Object[] fila_e = new Object[7];
            fila_e[0] = r.getObject("Nombre");
            fila_e[1] = r.getObject("Tipo");
            fila_e[2] = r.getObject("Estado");
            fila_e[3] = r.getObject("Lugar");
            fila_e[4] = r.getObject("Duracion");
            fila_e[5] = r.getObject("Fecha_inicio");
            fila_e[6] = r.getObject("Fecha_fin");
            modelo_evento.addRow(fila_e); // Añade una fila al final
        }
        r.close();
        //Devolvemos el numero de filas encontradas en la busqueda
        return contador;
    }

    public void jPEvenObtenerDatosFilaModelo() {
        nombre_e = (String) modelo_evento.getValueAt(sel_e, 0);
        tipos_e = (String) modelo_evento.getValueAt(sel_e, 1);
        estados_e = (String) modelo_evento.getValueAt(sel_e, 2);
        lugar_e = (String) modelo_evento.getValueAt(sel_e,3);
        duracions_e = modelo_evento.getValueAt(sel_e, 4).toString();
        duracion_e = Integer.valueOf(duracions_e);
        finicio_e = (Date) modelo_evento.getValueAt(sel_e, 5);
        ffin_e = (Date) modelo_evento.getValueAt(sel_e, 6);
        

        //System.out.println("Los datos de la fila  son: Nombre: " + nombre_e + " Tipo: " + tipos_e + " Estado: " + estados_e + "Lugar: "+ lugar_e + " Duracion: " + duracion_e +
        //        " Fecha de Inicio: " + finicio_e + " Fecha de Fin: " + ffin_e);
    }

    public void jPEvenRellenarFormulario() {
        int indice=-1;
        jTFEvenNombre.setText(nombre_e);
        jCBEvenTipo.setSelectedItem(tipos_e);
        if(estados_e.equals("En curso"))
                indice=1;
        if(estados_e.equals("En espera de inicio"))
                indice=0;
        if(estados_e.equals("Finalizado"))
                indice=2;
        if(estados_e.equals("Cancelado"))
                indice=3;
        jCBEvenEstado.setSelectedIndex(indice);
        jTFEvenLugar.setText(lugar_e);
        jTFEvenDuracion.setText(duracions_e);
        jFTFEvenFechaInicio.setText(finicio_e.toString());
        jFTFEvenFechaFin.setText(ffin_e.toString());
        jTAEvenDescripcion.setText(descripcion_e);
        jTFEvenResponsable.setText(responsable_e);
    }

    public void jPEvenObtenerDescripcionRes(ResultSet r) throws SQLException {
        if (r.next()) {
            id_e = Integer.valueOf(r.getObject("IDevento").toString());
            descripcion_e = (String) r.getObject("Descripcion");
            dniresponsable_e = (String) r.getObject("personal_DNI");
            //System.out.println("Los datos que faltaban son Descripcion: " + descripcion_e +
            //        " Responsable: " + dniresponsable_e);
        }
        r.close();
    }

    public void jPEvenObtenerResponsable(ResultSet r) throws SQLException {
        if (r.next()) {
            responsable_e = (String) r.getObject("Nombre");
            responsable_e = responsable_e + " " + r.getObject("Apellido1") + " " + r.getObject("Apellido2");
        }
        r.close();
    }

    //-EVENTOSS-//
    public Icon[] dameIconos()
    {
        Icon [] iconos = new Icon [2];
        iconos[0] = new ImageIcon (getClass().getResource("/ongclientejava/resources/button_ok.png"));
        iconos[1] = new ImageIcon (getClass().getResource("/ongclientejava/resources/button_cancel.png"));
        return iconos;
    }
    public void jPPersObtenerDatosFormulario(){
        nombre = jTFPersNombre.getText();
        ape1 = jTFPersApellido1.getText();
        ape2 = jTFPersApellido2.getText();
        tlf = jTFPersTelefono.getText();
        email = jTFPersEmail.getText();
        dir = jTFPersDireccion.getText();
        if(!jFTFPersFechaNacimiento.getText().isEmpty())
        fnacimiento= Date.valueOf(jFTFPersFechaNacimiento.getText());
        login_p=jTFPersLogin.getText();
        pass_p=jPFPersPassword.getText();
        perfil_p=(String) jCBPersPerfil.getSelectedItem();
        
    }
    
    public void obtener_DniFaltaFbaja(ResultSet r) throws SQLException{
        if (r.next()) {
            falta=r.getDate("Fecha_alta");
            fbaja=r.getDate("Fecha_baja");
            dir=(String) r.getObject("direccion");
            fnacimiento=r.getDate("Fecha_Nacimiento");
        }
    }
    
    public void obtenerDatosAcceso(ResultSet r) throws SQLException{
        naccesos=0;
        if (r.next()) {
            login_p=(String) r.getObject("Login");
            pass_p=(String) r.getObject("Contrasena");
            perfil_p=(String) r.getObject("Perfil_aplicacion");
            naccesos=1;
        }
    } 
            
    public void obtener_datos(){
        dni= (String) modelo_personal.getValueAt(sel, 1);
        nombre = (String) modelo_personal.getValueAt(sel, 2);
        ape1 = (String) modelo_personal.getValueAt(sel, 3);
        ape2 = (String) modelo_personal.getValueAt(sel, 4);
        tlf = (String) modelo_personal.getValueAt(sel, 5);
        email = (String) modelo_personal.getValueAt(sel, 6);
        
    }
    
    public void limpiar_formulario() {
        jTFPersDni.setText("");
        jTFPersNombre.setText("");
        jTFPersApellido1.setText("");
        jTFPersApellido2.setText("");
        jTFPersTelefono.setText("");
        jTFPersEmail.setText("");
        jTFPersDireccion.setText("");
        jTFPersFechaAlta.setText("");
        jTFPersFechaBaja.setText("");
        jFTFPersFechaNacimiento.setText("");
        jTFPersLogin.setText("");
        jPFPersPassword.setText("");
        jCBPersPerfil.setSelectedIndex(0);
    }
    
    public void jPPersonalActivarBotones(){
        jBPersNuevo.setEnabled(true);
        jBPersBuscar.setEnabled(true);
        jBPersGuardar.setEnabled(true);
    }
    
    public void jPPersonalInactivarBotones(){
        jBPersNuevo.setEnabled(false);
        jBPersBuscar.setEnabled(false);
        jBPersGuardar.setEnabled(false);
        jBPersBaja.setEnabled(false);
    }
    
    public void jPPersonalMostrarBusqueda(ResultSet r) throws SQLException{
        modelo_personal.getDataVector().clear();
        npersonas=0;
        while (r.next()) {
            Object[] fila = new Object[7];
            fbaja=r.getDate("Fecha_baja");
            if(fbaja==null){fila[0]=0;}
            else{fila[0]=1;}
            fila[1] = r.getObject("DNI");
            fila[2] = r.getObject("Nombre");
            fila[3] = r.getObject("Apellido1");
            fila[4] = r.getObject("Apellido2");
            fila[5] = r.getObject("Telefono");
            fila[6] = r.getObject("Email");
            modelo_personal.addRow(fila); // Añade una fila al final
            npersonas++;
        }
        r.close();
    }
    
    
    
    
    // -SOCIOS- //
    
    
    public void jPSocCrearModeloPagos(){
        modelo_pagos.addColumn("Cantidad");
        modelo_pagos.addColumn("Fecha Pago");
    }
    
    public void EditableDatosBanco(){
        jTFSocBanco.setEditable(true);
        jTFSocOficina.setEditable(true);
        jTFSocDC.setEditable(true);
        jTFSocCuenta.setEditable(true);
    }
    
    public void noEditableDatosBanco(){
        jTFSocBanco.setEditable(false);
        jTFSocOficina.setEditable(false);
        jTFSocDC.setEditable(false);
        jTFSocCuenta.setEditable(false);
    }
    
    public void limpiarDatosBanco(){
        jTFSocBanco.setText("");
        jTFSocOficina.setText("");
        jTFSocDC.setText("");
        jTFSocCuenta.setText("");
    }
    
    public void activarBotonesControlSocio(){
        jButtonNuevo.setEnabled(true);
        jButtonBuscar.setEnabled(true);
        jButtonGuardar.setEnabled(true);
    }
    
    public void desactivarBotonesControlSocio(){
        jButtonNuevo.setEnabled(false);
        jButtonBuscar.setEnabled(false);
        jButtonGuardar.setEnabled(false);
        jButtonBaja.setEnabled(false);
    }
    
    public void cambiarTransferencia(){
        jRBSocPagoTransferencia.setSelected(true);
        jRBSocPagoEfectivo.setSelected(false);
        EditableDatosBanco();
    }

    public void cambiarEfectivo(){
        jRBSocPagoTransferencia.setSelected(false);
        jRBSocPagoEfectivo.setSelected(true);
        limpiarDatosBanco();
        noEditableDatosBanco();
        
    }
    
    public void cambiarIconoBaja(){
        // Cambiar icono de baja            
        if (fbaja_s != null) {
            jButtonBaja.setIcon(icon_añadir_grande);
        }
        if (fbaja_s == null) {
            jButtonBaja.setIcon(icon_cancelar);
        }
    }
    
    public void limpiarFormularioSocios() {
        jTFSocDNI.setText("");
        jTFSocNombre.setText("");
        jTFSocApellido1.setText("");
        jTFSocApellido2.setText("");
        jFTFSocFechaNac.setText("");
        jTFSocTelefono.setText("");
        jTFSocDireccion.setText("");
        jTFSocEmail.setText("");
        jTFSocCuota.setText("");
        jCBSocPeriodicidad.setSelectedIndex(0);
        
        jTSocPagos.clearSelection(); //Deseleccionamos las filas y columnas de la tabla
        
        cambiarEfectivo();
        jTFSocCantidad.setText("");
        jFTFSocFechaPago.setText("");
        jTFSocCantidad.setEditable(false);
        jFTFSocFechaPago.setEditable(false);
        jButtonPagar.setEnabled(false); // Desactivar botón pagar
        
        desactivarBotonesControlSocio();
        
        borrarTablaPagos();
        
    }
    
    public void borrarTablaPagos(){
        int tama = modelo_pagos.getRowCount();
        for(int i=tama-1; i>=0; i--)
            modelo_pagos.removeRow(i); // Eliminar contenido de la tabla pagos
    }
    
    public void jPSocMostrar(){
        res_soc = bd.mostrarSocios();
        try {
            jPSocMostrarSocios(res_soc);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    
    public void jPSocMostrarSocios(ResultSet rs) throws SQLException{
        // query("SELECT s.personal_DNI, p.Apellido1, p.Apellido2, s.Cuota, s.Periodicidad, Fecha_fin
        modelo_socios.getDataVector().clear();
        nsocios=0;
        while(rs.next()){
            Object[] fila = new Object[7];
            fbaja_s = rs.getDate("s.Fecha_baja");
            // Para meter el icono
            if(fbaja_s==null)
                fila[0]=0;
            else
                fila[0]=1;
            
            if(!jCheckBoxMostrar.isSelected()){
                // Solo muestra los activos
                if(fbaja_s==null){
                    fila[1] = rs.getObject("s.personal_DNI");
                    fila[2] = rs.getObject("p.Nombre");
                    fila[3] = rs.getObject("p.Apellido1");
                    fila[4] = rs.getObject("p.Apellido2");
                    fila[5] = rs.getObject("s.Cuota");
                    fila[6] = rs.getObject("s.Perioricidad");
                    modelo_socios.addRow(fila);
                }
            }
            // Muestra todos
            else{
                fila[1] = rs.getObject("s.personal_DNI");
                fila[2] = rs.getObject("p.Nombre");
                fila[3] = rs.getObject("p.Apellido1");
                fila[4] = rs.getObject("p.Apellido2");
                fila[5] = rs.getObject("s.Cuota");
                fila[6] = rs.getObject("s.Perioricidad");
                modelo_socios.addRow(fila);
                nsocios++;
            }
        }
        rs.close();
    }
    
    public void jPSocPagosMostrar(String dni){
        borrarTablaPagos();
        res_soc = bd.mostrarPagos(dni);
        try {
            jPSocPagosMostrarPagos(res_soc);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    
    public void jPSocPagosMostrarPagos(ResultSet rs) throws SQLException{
        // query("SELECT s.personal_DNI, p.Apellido1, p.Apellido2, s.Cuota, s.Periodicidad, Fecha_fin
        modelo_pagos.getDataVector().clear();
        while(rs.next()){
            Object[] fila = new Object[2];
            fila[0] = rs.getObject("Cantidad");
            fila[1] = rs.getObject("FechaPago");
            modelo_pagos.addRow(fila);
        }
        rs.close();
    }
    
    public void jPSocObtenerDatosFormulario(){
        if(!jTFSocCuota.getText().isEmpty())
            cuota_s = Float.parseFloat(jTFSocCuota.getText());
        nombre_s = jTFSocNombre.getText();
        ape1_s = jTFSocApellido1.getText();
        ape2_s = jTFSocApellido2.getText();
        per_s = jCBSocPeriodicidad.getSelectedItem().toString();
        
        if (jRBSocPagoTransferencia.isSelected()){ //Falta validar los campos
            forma_pago_s = jRBSocPagoTransferencia.getText();
            datos_bancarios_s = jTFSocBanco.getText() + jTFSocOficina.getText() + jTFSocDC.getText() + jTFSocCuenta.getText();
        }
        
        else
            forma_pago_s = jRBSocPagoEfectivo.getText();
        
        if(!jFTFSocFechaNac.getText().isEmpty())
            fnacimiento_s = Date.valueOf(jFTFSocFechaNac.getText());

        email_s = jTFSocEmail.getText();
        dir_s = jTFSocDireccion.getText();
        tlf_s = jTFSocTelefono.getText();        
    }
    
    public void jPDonObtenerDatosFormulario(){
        dni_d = jTFDNI.getText();
        nombre_d = jTFNombre.getText();
        ape1_d = jTFApellido1.getText();
        ape2_d = jTFApellido2.getText();
        if(!jTFCantidad.getText().isEmpty())
            cantidad_d = Float.parseFloat(jTFCantidad.getText());
        if(!jTFFechaPago.getText().isEmpty())
            fpago_d = Date.valueOf(jTFFechaPago.getText());
    }

    public boolean comprobarFecha(String fechanac){

        String anio = "", mes = "", dia = "", guion = "";

        // año
        if (fechanac.length() > 4){
            anio = fechanac.substring(0,4);
            try{
                int numero = Integer.parseInt(anio);
            }catch(NumberFormatException e){
                return false;
            } 
        }
        else
            return false;
        //primer guion
        if (fechanac.length() > 5){
            guion = fechanac.substring(4,5);
            //System.out.println(guion);
            if (!guion.equals("-"))
                return false;
        }
        else
            return false;
        //mes
        if (fechanac.length() > 7){
            mes = fechanac.substring(5,7);
            try{
                int numero = Integer.parseInt(mes);
            }catch(NumberFormatException e){
                return false;
            }
        }
        else
            return false;
        //seugundo guion
        if (fechanac.length() > 8){
            guion = fechanac.substring(7,8);
            if (!guion.equals("-"))
                return false;
        }
        else
            return false;
        //dia
        if (fechanac.length() == 10){
            dia = fechanac.substring(5,7);
            try{
                int numero = Integer.parseInt(dia);
            }catch(NumberFormatException e){
                return false;
            }
        }
        else
            return false;


        return true;
    }

    public boolean comprobarDatosBancarios(String banco, String oficina, String DC, String cuenta){
        if(banco.length() != 4 || oficina.length()!= 4 || DC.length()!= 2 || cuenta.length() != 10 )
            return false;
        else
            return true;
    }

    public boolean comprobarFloat(String numero){

        try{
            float num = Float.parseFloat(numero);
        }catch(NumberFormatException e){
            return false;
        } 
        return true;
    }
    
    
    
    
    //- DONATIVOS -//
    
    public void limpiarFormularioDonativos(){
        jTFDNI.setText("");
        jTFNombre.setText("");
        jTFApellido1.setText("");
        jTFApellido2.setText("");
        jTFCantidad.setText("");
        jTFFechaPago.setText("");
    }
    
    public void crearModeloDonativos(){
        modelo_donativos.addColumn("Nombre y Apellidos");
        modelo_donativos.addColumn("Cantidad");
        modelo_donativos.addColumn("Fecha Pago");
    }
    
    public void MostrarDonativosNulos(){
        res_don = bd.mostrarDonativosNulos();
        
        try {
            jMostrarDonativosNulos(res_don);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    
    
    public void jMostrarDonativosNulos(ResultSet rs) throws SQLException{

        modelo_donativos.getDataVector().clear();

        while(rs.next()){
            
            nombreApellidos = "";
            
            Object[] fila = new Object[3];

            String dni_don = (String) rs.getObject("personal_DNI");
            
            
            if(dni_don == null){
                //nombreApellidos = (String) rs.getObject("p.Nombre")+" "+rs.getObject("p.Apellido1")+" "+rs.getObject("p.Apellido2"); 
                nombreApellidos = "";
                fila[0] = nombreApellidos;
                fila[1] = rs.getObject("Cantidad");
                fila[2] = rs.getDate("Fecha_Pago");
                modelo_donativos.addRow(fila);
            }
            
        }
        rs.close();
    }
    
    
    
    public void MostrarDonativos(){
        res_don = bd.mostrarDonativos();
        
        try {
            jMostrarDonativos(res_don);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    
    
    public void jMostrarDonativos(ResultSet rs) throws SQLException{

        modelo_donativos.getDataVector().clear();

        while(rs.next()){
            
            Object[] fila = new Object[3];
            
            
            
            nombreApellidos = (String) rs.getObject("p.Nombre")+" "+rs.getObject("p.Apellido1")+" "+rs.getObject("p.Apellido2"); 
           
            fila[0] = nombreApellidos;
            fila[1] = rs.getObject("d.Cantidad");
             //System.out.println(fila[1]);
            fila[2] = rs.getDate("d.Fecha_Pago");
            modelo_donativos.addRow(fila);
            
        }
        rs.close();
    }
    
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        mainPanel = new javax.swing.JPanel();
        jPToolbar = new javax.swing.JPanel();
        jTBProyectos = new javax.swing.JToggleButton();
        jTBPersonal = new javax.swing.JToggleButton();
        jTBEventos = new javax.swing.JToggleButton();
        jTBSocios = new javax.swing.JToggleButton();
        jTBDonaciones = new javax.swing.JToggleButton();
        jTBONG = new javax.swing.JToggleButton();
        jPMain = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        jBGToolbar = new javax.swing.ButtonGroup();
        jPPersonal = new javax.swing.JPanel();
        jPPersN = new javax.swing.JPanel();
        jPPersMostar = new javax.swing.JPanel();
        jCBMostar = new javax.swing.JCheckBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTPersonal = new javax.swing.JTable();
        jPPersC = new javax.swing.JPanel();
        jTPPers = new javax.swing.JTabbedPane();
        jPPersFormulario = new javax.swing.JPanel();
        jPanel31 = new javax.swing.JPanel();
        jBPersNuevo = new javax.swing.JButton();
        jBPersBuscar = new javax.swing.JButton();
        jBPersGuardar = new javax.swing.JButton();
        jBPersBaja = new javax.swing.JButton();
        jPanel32 = new javax.swing.JPanel();
        jLPersDni = new javax.swing.JLabel();
        jTFPersDni = new javax.swing.JTextField();
        jLPersNombre = new javax.swing.JLabel();
        jTFPersNombre = new javax.swing.JTextField();
        jLPersApellido1 = new javax.swing.JLabel();
        jTFPersApellido1 = new javax.swing.JTextField();
        jLPersApellido2 = new javax.swing.JLabel();
        jTFPersApellido2 = new javax.swing.JTextField();
        jLPersTelefono = new javax.swing.JLabel();
        jTFPersTelefono = new javax.swing.JTextField();
        jLPersEmail = new javax.swing.JLabel();
        jTFPersEmail = new javax.swing.JTextField();
        jLPersFechaAlta = new javax.swing.JLabel();
        jTFPersFechaAlta = new javax.swing.JFormattedTextField();
        jLPersFechaBaja = new javax.swing.JLabel();
        jTFPersFechaBaja = new javax.swing.JFormattedTextField();
        jTFPersDireccion = new javax.swing.JTextField();
        jLPersFechaNacimiento = new javax.swing.JLabel();
        jLPersDireccion = new javax.swing.JLabel();
        jLPersLogin = new javax.swing.JLabel();
        jTFPersLogin = new javax.swing.JTextField();
        jPFPersPassword = new javax.swing.JPasswordField();
        jLPersPassword = new javax.swing.JLabel();
        jCBPersPerfil = new javax.swing.JComboBox();
        jLPersPerfil = new javax.swing.JLabel();
        jFTFPersFechaNacimiento = new javax.swing.JFormattedTextField();
        jPPersCurriculum = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        Consultar_button1 = new javax.swing.JButton();
        jScrollPane8 = new javax.swing.JScrollPane();
        Curriculum_text1 = new javax.swing.JTextArea();
        jPPersS = new javax.swing.JPanel();
        jBPersAceptar = new javax.swing.JButton();
        jPProyectos = new javax.swing.JPanel();
        jPProyS = new javax.swing.JPanel();
        jTPProyC = new javax.swing.JTabbedPane();
        jTPProyectos = new javax.swing.JPanel();
        Arriba_panel = new javax.swing.JPanel();
        Abajo_panel = new javax.swing.JPanel();
        Izquierda_panell = new javax.swing.JPanel();
        Derecha_panel = new javax.swing.JPanel();
        Central_panel = new javax.swing.JPanel();
        Nortep_panel = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jTProyectos = new javax.swing.JTable();
        Categoria_panel = new javax.swing.JPanel();
        Categoria_label = new javax.swing.JLabel();
        jCBProyCategoria2 = new javax.swing.JComboBox();
        jBProyAñadirCategoria = new javax.swing.JButton();
        jBProyEliminarCategoria = new javax.swing.JButton();
        Centrop_panel = new javax.swing.JPanel();
        Formulario_panel = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        Nombrep_panel = new javax.swing.JLabel();
        jTFProyNombre = new javax.swing.JTextField();
        Paisp_label = new javax.swing.JLabel();
        jTFProyPais = new javax.swing.JTextField();
        Estadop_label = new javax.swing.JLabel();
        jCBProyEstado = new javax.swing.JComboBox();
        Categoriap_label = new javax.swing.JLabel();
        jCBProyCategoria = new javax.swing.JComboBox();
        jLProySubvencion = new javax.swing.JLabel();
        jTFProySubvencion = new javax.swing.JTextField();
        jBProyCambiarEstado = new javax.swing.JButton();
        jPanel21 = new javax.swing.JPanel();
        Imagenes_panel = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        Imagenesp_label1 = new javax.swing.JLabel();
        jPanel19 = new javax.swing.JPanel();
        jBProyAñadirImagen = new javax.swing.JButton();
        jBProyEliminarImagen = new javax.swing.JButton();
        jPanel22 = new javax.swing.JPanel();
        jPanel23 = new javax.swing.JPanel();
        jPanel39 = new javax.swing.JPanel();
        jLProyImagen = new javax.swing.JLabel();
        Descripcionp_panel = new javax.swing.JPanel();
        jScrollPane10 = new javax.swing.JScrollPane();
        jTAProyDescripcion = new javax.swing.JTextArea();
        jPanel17 = new javax.swing.JPanel();
        Descripcionp_label = new javax.swing.JLabel();
        Responsable_panel = new javax.swing.JPanel();
        Responsablep_label = new javax.swing.JLabel();
        jTFProyResponsable = new javax.swing.JTextField();
        jBProyFijarResponsable = new javax.swing.JButton();
        jBProyNuevo = new javax.swing.JButton();
        jBProyBuscar = new javax.swing.JButton();
        jBProyGuardar = new javax.swing.JButton();
        jBProyEliminar = new javax.swing.JButton();
        Separador_panel = new javax.swing.JPanel();
        jTPTareas = new javax.swing.JPanel();
        Ntareas_panel = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        Botones_panel = new javax.swing.JPanel();
        jBTarIniciar = new javax.swing.JButton();
        jBTarFinalizar = new javax.swing.JButton();
        jBTarEliminar = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTTareas = new javax.swing.JTable();
        Stareas_panel = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        Contratados_panel = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        Contratados_label = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jBTarAñadirContratado = new javax.swing.JButton();
        jBTarFinalizarContratado = new javax.swing.JButton();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTContratados = new javax.swing.JTable();
        Gastos_panel = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        Gastos_label = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jPanel29 = new javax.swing.JPanel();
        jBTarEliminarGasto = new javax.swing.JButton();
        jBTarAñadirGasto = new javax.swing.JButton();
        jPanel30 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTGastos = new javax.swing.JTable();
        jPanel25 = new javax.swing.JPanel();
        Ctareas_panel = new javax.swing.JPanel();
        centro_abajo_panel = new javax.swing.JPanel();
        Centro_arriba_panel = new javax.swing.JPanel();
        Rellenar_campos_panel = new javax.swing.JPanel();
        jLTarNombre = new javax.swing.JLabel();
        jTFTarNombre = new javax.swing.JTextField();
        jLTarPresupuesto = new javax.swing.JLabel();
        jTFTarPresupuesto = new javax.swing.JTextField();
        jLTarDirector = new javax.swing.JLabel();
        jTFTarDirector = new javax.swing.JTextField();
        jBTarFijarDirector = new javax.swing.JButton();
        jBTarNuevo = new javax.swing.JButton();
        jBTarGuardar = new javax.swing.JButton();
        jLTarTipo = new javax.swing.JLabel();
        jCBTarTipo = new javax.swing.JComboBox();
        Descripcion_panel = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        Descripcion_label = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTFTarDescripcion = new javax.swing.JTextArea();
        Voluntarios_panel = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        Voluntarios_label = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jBTarAñadirVoluntario = new javax.swing.JButton();
        jBTarFinalizarVoluntario = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTVoluntarios = new javax.swing.JTable();
        jPEventos = new javax.swing.JPanel();
        jPEvenE = new javax.swing.JPanel();
        jTFEvenNombre = new javax.swing.JTextField();
        jCBEvenEstado = new javax.swing.JComboBox();
        jTFEvenDuracion = new javax.swing.JTextField();
        jLEvenNombre = new javax.swing.JLabel();
        jLEvenEstado = new javax.swing.JLabel();
        jLEvenDuracion = new javax.swing.JLabel();
        jLEvenFechaInicio = new javax.swing.JLabel();
        jLEvenFechaFin = new javax.swing.JLabel();
        jLEvenResponsable = new javax.swing.JLabel();
        jFTFEvenFechaInicio = new javax.swing.JFormattedTextField();
        jFTFEvenFechaFin = new javax.swing.JFormattedTextField();
        jBEvenFijarResponsable = new javax.swing.JButton();
        jLEvenTipo = new javax.swing.JLabel();
        jCBEvenTipo = new javax.swing.JComboBox();
        jTFEvenResponsable = new javax.swing.JTextField();
        jLEvenLugar = new javax.swing.JLabel();
        jTFEvenLugar = new javax.swing.JTextField();
        jPEvenS = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane11 = new javax.swing.JScrollPane();
        jTAEvenDescripcion = new javax.swing.JTextArea();
        jPanel24 = new javax.swing.JPanel();
        jLEvenDescripcion = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jBEvenNuevo = new javax.swing.JButton();
        jBEvenBuscar = new javax.swing.JButton();
        jBEvenGuardar = new javax.swing.JButton();
        jBEvenCancelar = new javax.swing.JButton();
        jPEvenC = new javax.swing.JPanel();
        jScrollPane12 = new javax.swing.JScrollPane();
        jTEventos = new javax.swing.JTable();
        jPanel26 = new javax.swing.JPanel();
        jPanel27 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jPDonaciones = new javax.swing.JPanel();
        jPONG = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jLONGNombre = new javax.swing.JLabel();
        jTFONGNombre = new javax.swing.JTextField();
        jLONGDireccion = new javax.swing.JLabel();
        jTFONGDireccion = new javax.swing.JTextField();
        jLONGTelefono = new javax.swing.JLabel();
        jTFONGTelefono = new javax.swing.JTextField();
        jLONGEmail = new javax.swing.JLabel();
        jTFONGEmail = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jScrollPane13 = new javax.swing.JScrollPane();
        jTAONGDescripcion = new javax.swing.JTextArea();
        jBONGLimpiar = new javax.swing.JButton();
        jBONGGuardar = new javax.swing.JButton();
        jLONGLogo = new javax.swing.JLabel();
        jTFONGLogo = new javax.swing.JTextField();
        jPanel35 = new javax.swing.JPanel();
        jPanel36 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jPanel38 = new javax.swing.JPanel();
        jLONGImagen = new javax.swing.JLabel();
        jPBienvenida = new javax.swing.JPanel();
        jPDatosONG = new javax.swing.JPanel();
        jLBNombre = new javax.swing.JLabel();
        jLBDireccion = new javax.swing.JLabel();
        jLBTelefono = new javax.swing.JLabel();
        jLBEmail = new javax.swing.JLabel();
        jTFBDescripcion = new javax.swing.JTextField();
        jLBLogo = new javax.swing.JLabel();
        jLBDescripcion = new javax.swing.JLabel();
        jTFBNombre = new javax.swing.JTextField();
        jTFBDireccion = new javax.swing.JTextField();
        jTFBTelefono = new javax.swing.JTextField();
        jTFBEmail = new javax.swing.JTextField();
        jPanel40 = new javax.swing.JPanel();
        jLONGImagen1 = new javax.swing.JLabel();
        jPLogin = new javax.swing.JPanel();
        jIFLogin = new javax.swing.JInternalFrame();
        jLabel2 = new javax.swing.JLabel();
        jPFPassword = new javax.swing.JPasswordField();
        jLabel1 = new javax.swing.JLabel();
        jTFUsuario = new javax.swing.JTextField();
        jBAceptar = new javax.swing.JButton();
        jBBorrar = new javax.swing.JButton();
        jLLogin = new javax.swing.JLabel();
        jPSocios = new javax.swing.JPanel();
        jTabbedSocio = new javax.swing.JTabbedPane();
        jPanelDatos = new javax.swing.JPanel();
        jSocPersona = new javax.swing.JPanel();
        jLSocDNI = new javax.swing.JLabel();
        jLSocNombre = new javax.swing.JLabel();
        jLSocApellido1 = new javax.swing.JLabel();
        jLSocApellido2 = new javax.swing.JLabel();
        jLSocFechaNac = new javax.swing.JLabel();
        jLSocTelefono = new javax.swing.JLabel();
        jLSocDireccion = new javax.swing.JLabel();
        jLSocEmail = new javax.swing.JLabel();
        jTFSocDNI = new javax.swing.JTextField();
        jTFSocNombre = new javax.swing.JTextField();
        jTFSocApellido1 = new javax.swing.JTextField();
        jTFSocApellido2 = new javax.swing.JTextField();
        jTFSocTelefono = new javax.swing.JTextField();
        jTFSocDireccion = new javax.swing.JTextField();
        jTFSocEmail = new javax.swing.JTextField();
        jFTFSocFechaNac = new javax.swing.JFormattedTextField();
        jSocCuota = new javax.swing.JPanel();
        jLSocCuota = new javax.swing.JLabel();
        jTFSocCuota = new javax.swing.JTextField();
        jLSocPeriodicidad = new javax.swing.JLabel();
        jCBSocPeriodicidad = new javax.swing.JComboBox();
        jLSocFormaPago = new javax.swing.JLabel();
        jPanelBanco = new javax.swing.JPanel();
        jTFSocBanco = new javax.swing.JTextField();
        jTFSocOficina = new javax.swing.JTextField();
        jLSocOficina = new javax.swing.JLabel();
        jLSocDC = new javax.swing.JLabel();
        jTFSocCuenta = new javax.swing.JTextField();
        jTFSocDC = new javax.swing.JTextField();
        jLSocCuenta = new javax.swing.JLabel();
        jLSocBanco = new javax.swing.JLabel();
        jRBSocPagoTransferencia = new javax.swing.JRadioButton();
        jRBSocPagoEfectivo = new javax.swing.JRadioButton();
        jPanelControl = new javax.swing.JPanel();
        jButtonNuevo = new javax.swing.JButton();
        jButtonBuscar = new javax.swing.JButton();
        jButtonGuardar = new javax.swing.JButton();
        jButtonBaja = new javax.swing.JButton();
        jPanelPago = new javax.swing.JPanel();
        jSocPago = new javax.swing.JPanel();
        jLSocCantidad = new javax.swing.JLabel();
        jTFSocCantidad = new javax.swing.JTextField();
        jLSocFechaPago = new javax.swing.JLabel();
        jFTFSocFechaPago = new javax.swing.JFormattedTextField();
        jButtonPagar = new javax.swing.JButton();
        jSocContenedorPagos = new javax.swing.JScrollPane();
        jTSocPagos = new javax.swing.JTable();
        jScrollPaneSocios = new javax.swing.JScrollPane();
        jTSocSocios = new javax.swing.JTable();
        jCheckBoxMostrar = new javax.swing.JCheckBox();
        jPDonativos = new javax.swing.JPanel();
        jPFormulario = new javax.swing.JPanel();
        jTFApellido1 = new javax.swing.JTextField();
        jLDNI = new javax.swing.JLabel();
        jLNombre = new javax.swing.JLabel();
        jLApellido1 = new javax.swing.JLabel();
        jLApellido2 = new javax.swing.JLabel();
        jTFDNI = new javax.swing.JTextField();
        jTFNombre = new javax.swing.JTextField();
        jTFApellido2 = new javax.swing.JTextField();
        jPDatosPago = new javax.swing.JPanel();
        jLCantidad = new javax.swing.JLabel();
        jLFechaPago = new javax.swing.JLabel();
        jTFCantidad = new javax.swing.JTextField();
        jTFFechaPago = new javax.swing.JTextField();
        jBPagar = new javax.swing.JButton();
        jScrollPaneDonativos = new javax.swing.JScrollPane();
        jTDonativos = new javax.swing.JTable();
        jCBMostrarAnonimos = new javax.swing.JCheckBox();

        mainPanel.setMinimumSize(new java.awt.Dimension(431, 431));
        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setPreferredSize(new java.awt.Dimension(700, 500));
        mainPanel.setLayout(new java.awt.BorderLayout(5, 0));

        jPToolbar.setMinimumSize(new java.awt.Dimension(349, 46));
        jPToolbar.setName("jPToolbar"); // NOI18N
        jPToolbar.setPreferredSize(new java.awt.Dimension(349, 46));
        jPToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 3));

        jBGToolbar.add(jTBProyectos);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ongclientejava.ONGestionaApp.class).getContext().getResourceMap(ONGestionaView.class);
        jTBProyectos.setFont(resourceMap.getFont("jTBProyectos.font")); // NOI18N
        jTBProyectos.setText(resourceMap.getString("jTBProyectos.text")); // NOI18N
        jTBProyectos.setActionCommand(resourceMap.getString("jTBProyectos.actionCommand")); // NOI18N
        jTBProyectos.setName("jTBProyectos"); // NOI18N
        jTBProyectos.setPreferredSize(new java.awt.Dimension(120, 40));
        jTBProyectos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTBProyectosActionPerformed(evt);
            }
        });
        jPToolbar.add(jTBProyectos);

        jBGToolbar.add(jTBPersonal);
        jTBPersonal.setFont(resourceMap.getFont("jTBPersonal.font")); // NOI18N
        jTBPersonal.setText(resourceMap.getString("jTBPersonal.text")); // NOI18N
        jTBPersonal.setActionCommand(resourceMap.getString("jTBPersonal.actionCommand")); // NOI18N
        jTBPersonal.setName("jTBPersonal"); // NOI18N
        jTBPersonal.setPreferredSize(new java.awt.Dimension(120, 40));
        jTBPersonal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTBPersonalActionPerformed(evt);
            }
        });
        jPToolbar.add(jTBPersonal);

        jBGToolbar.add(jTBEventos);
        jTBEventos.setFont(resourceMap.getFont("jTBEventos.font")); // NOI18N
        jTBEventos.setText(resourceMap.getString("jTBEventos.text")); // NOI18N
        jTBEventos.setName("jTBEventos"); // NOI18N
        jTBEventos.setPreferredSize(new java.awt.Dimension(120, 40));
        jTBEventos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTBEventosActionPerformed(evt);
            }
        });
        jPToolbar.add(jTBEventos);

        jBGToolbar.add(jTBSocios);
        jTBSocios.setFont(resourceMap.getFont("jTBSocios.font")); // NOI18N
        jTBSocios.setText(resourceMap.getString("jTBSocios.text")); // NOI18N
        jTBSocios.setActionCommand(resourceMap.getString("jTBSocios.actionCommand")); // NOI18N
        jTBSocios.setName("jTBSocios"); // NOI18N
        jTBSocios.setPreferredSize(new java.awt.Dimension(120, 40));
        jTBSocios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTBSociosActionPerformed(evt);
            }
        });
        jPToolbar.add(jTBSocios);

        jBGToolbar.add(jTBDonaciones);
        jTBDonaciones.setText(resourceMap.getString("jTBDonaciones.text")); // NOI18N
        jTBDonaciones.setName("jTBDonaciones"); // NOI18N
        jTBDonaciones.setPreferredSize(new java.awt.Dimension(120, 40));
        jTBDonaciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTBDonacionesActionPerformed(evt);
            }
        });
        jPToolbar.add(jTBDonaciones);

        jBGToolbar.add(jTBONG);
        jTBONG.setText(resourceMap.getString("jTBONG.text")); // NOI18N
        jTBONG.setName("jTBONG"); // NOI18N
        jTBONG.setPreferredSize(new java.awt.Dimension(120, 40));
        jTBONG.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTBONGActionPerformed(evt);
            }
        });
        jPToolbar.add(jTBONG);

        mainPanel.add(jPToolbar, java.awt.BorderLayout.PAGE_START);

        jPMain.setMinimumSize(new java.awt.Dimension(600, 400));
        jPMain.setName("jPMain"); // NOI18N
        jPMain.setPreferredSize(new java.awt.Dimension(1000, 550));
        jPMain.setLayout(new java.awt.BorderLayout());

        jSeparator1.setMinimumSize(new java.awt.Dimension(0, 10));
        jSeparator1.setName("jSeparator1"); // NOI18N
        jPMain.add(jSeparator1, java.awt.BorderLayout.PAGE_START);

        mainPanel.add(jPMain, java.awt.BorderLayout.CENTER);

        menuBar.setName("menuBar"); // NOI18N
        menuBar.setPreferredSize(new java.awt.Dimension(92, 30));

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ongclientejava.ONGestionaApp.class).getContext().getActionMap(ONGestionaView.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setMinimumSize(new java.awt.Dimension(0, 0));
        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 980, Short.MAX_VALUE)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1000, Short.MAX_VALUE)
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel))
                .addGap(3, 3, 3))
        );

        jPPersonal.setBackground(resourceMap.getColor("jPPersonal.background")); // NOI18N
        jPPersonal.setMinimumSize(new java.awt.Dimension(800, 440));
        jPPersonal.setName("jPPersonal"); // NOI18N
        jPPersonal.setPreferredSize(new java.awt.Dimension(0, 0));
        jPPersonal.setRequestFocusEnabled(false);
        jPPersonal.setLayout(new javax.swing.BoxLayout(jPPersonal, javax.swing.BoxLayout.PAGE_AXIS));

        jPPersN.setMinimumSize(new java.awt.Dimension(320, 50));
        jPPersN.setName("jPPersN"); // NOI18N
        jPPersN.setPreferredSize(new java.awt.Dimension(640, 340));
        jPPersN.setLayout(new java.awt.BorderLayout());

        jPPersMostar.setMaximumSize(new java.awt.Dimension(32767, 23));
        jPPersMostar.setMinimumSize(new java.awt.Dimension(320, 23));
        jPPersMostar.setName("jPPersMostar"); // NOI18N
        jPPersMostar.setPreferredSize(new java.awt.Dimension(640, 23));
        jPPersMostar.setLayout(new java.awt.BorderLayout());

        jCBMostar.setText("Mostrar Todos"); // NOI18N
        jCBMostar.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jCBMostar.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        jCBMostar.setName("jCBMostar"); // NOI18N
        jCBMostar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBMostarActionPerformed(evt);
            }
        });
        jPPersMostar.add(jCBMostar, java.awt.BorderLayout.LINE_END);

        jPPersN.add(jPPersMostar, java.awt.BorderLayout.PAGE_END);

        jScrollPane1.setMaximumSize(jPPersN.getMaximumSize());
        jScrollPane1.setMinimumSize(jPPersN.getMinimumSize());
        jScrollPane1.setName("jScrollPane1"); // NOI18N
        jScrollPane1.setPreferredSize(jPPersN.getPreferredSize());

        jTPersonal.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "E", "NOMBRE", "1er APELLIDO", "2do APELLIDO", "E-MAIL", "TELEFONO"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTPersonal.setName("jTPersonal"); // NOI18N
        jTPersonal.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTPersonalMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTPersonal);
        jTPersonal.getColumnModel().getColumn(0).setPreferredWidth(10);
        jTPersonal.getColumnModel().getColumn(1).setPreferredWidth(100);
        jTPersonal.getColumnModel().getColumn(2).setPreferredWidth(100);
        jTPersonal.getColumnModel().getColumn(3).setPreferredWidth(100);
        jTPersonal.getColumnModel().getColumn(4).setPreferredWidth(100);
        jTPersonal.getColumnModel().getColumn(5).setPreferredWidth(100);

        jPPersN.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jPPersonal.add(jPPersN);

        jPPersC.setMaximumSize(new java.awt.Dimension(32767, 180));
        jPPersC.setMinimumSize(new java.awt.Dimension(320, 180));
        jPPersC.setName("jPPersC"); // NOI18N
        jPPersC.setPreferredSize(new java.awt.Dimension(640, 250));
        jPPersC.setLayout(new java.awt.BorderLayout());

        jTPPers.setMaximumSize(new java.awt.Dimension(32767, 180));
        jTPPers.setMinimumSize(new java.awt.Dimension(320, 180));
        jTPPers.setName("jTPPers"); // NOI18N
        jTPPers.setPreferredSize(new java.awt.Dimension(640, 420));

        jPPersFormulario.setMaximumSize(new java.awt.Dimension(2147483647, 180));
        jPPersFormulario.setMinimumSize(new java.awt.Dimension(0, 180));
        jPPersFormulario.setName("jPPersFormulario"); // NOI18N
        jPPersFormulario.setPreferredSize(new java.awt.Dimension(0, 180));
        jPPersFormulario.setLayout(new java.awt.BorderLayout());

        jPanel31.setName("jPanel31"); // NOI18N
        jPanel31.setPreferredSize(new java.awt.Dimension(320, 100));
        jPanel31.setLayout(new java.awt.GridBagLayout());

        jBPersNuevo.setName("jBPersNuevo"); // NOI18N
        jBPersNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBPersNuevoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(30, 5, 5, 5);
        jPanel31.add(jBPersNuevo, gridBagConstraints);

        jBPersBuscar.setName("jBPersBuscar"); // NOI18N
        jBPersBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBPersBuscarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(30, 5, 5, 5);
        jPanel31.add(jBPersBuscar, gridBagConstraints);

        jBPersGuardar.setName("jBPersGuardar"); // NOI18N
        jBPersGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBPersGuardarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(30, 5, 5, 5);
        jPanel31.add(jBPersGuardar, gridBagConstraints);

        jBPersBaja.setName("jBPersBaja"); // NOI18N
        jBPersBaja.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBPersBajaActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(30, 5, 5, 5);
        jPanel31.add(jBPersBaja, gridBagConstraints);

        jPPersFormulario.add(jPanel31, java.awt.BorderLayout.LINE_END);

        jPanel32.setMaximumSize(new java.awt.Dimension(10, 100));
        jPanel32.setMinimumSize(new java.awt.Dimension(10, 100));
        jPanel32.setName("jPanel32"); // NOI18N
        jPanel32.setPreferredSize(new java.awt.Dimension(10, 100));
        jPanel32.setLayout(new java.awt.GridBagLayout());

        jLPersDni.setText("DNI"); // NOI18N
        jLPersDni.setName("jLPersDni"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 15;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersDni, gridBagConstraints);

        jTFPersDni.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersDni.setName("jTFPersDni"); // NOI18N
        jTFPersDni.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersDniKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersDni, gridBagConstraints);

        jLPersNombre.setText("NOMBRE"); // NOI18N
        jLPersNombre.setName("jLPersNombre"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 15;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersNombre, gridBagConstraints);

        jTFPersNombre.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersNombre.setName("jTFPersNombre"); // NOI18N
        jTFPersNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersNombreKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersNombre, gridBagConstraints);

        jLPersApellido1.setText("1er.APELLIDO"); // NOI18N
        jLPersApellido1.setName("jLPersApellido1"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 15;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersApellido1, gridBagConstraints);

        jTFPersApellido1.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersApellido1.setName("jTFPersApellido1"); // NOI18N
        jTFPersApellido1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersApellido1KeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersApellido1, gridBagConstraints);

        jLPersApellido2.setText("2do.APELLIDO"); // NOI18N
        jLPersApellido2.setName("jLPersApellido2"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 15;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersApellido2, gridBagConstraints);

        jTFPersApellido2.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersApellido2.setName("jTFPersApellido2"); // NOI18N
        jTFPersApellido2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersApellido2KeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersApellido2, gridBagConstraints);

        jLPersTelefono.setText("TELEFONO"); // NOI18N
        jLPersTelefono.setName("jLPersTelefono"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 15;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersTelefono, gridBagConstraints);

        jTFPersTelefono.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersTelefono.setName("jTFPersTelefono"); // NOI18N
        jTFPersTelefono.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersTelefonoKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersTelefono, gridBagConstraints);

        jLPersEmail.setText("E-MAIL"); // NOI18N
        jLPersEmail.setName("jLPersEmail"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 15;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersEmail, gridBagConstraints);

        jTFPersEmail.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersEmail.setName("jTFPersEmail"); // NOI18N
        jTFPersEmail.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersEmailKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersEmail, gridBagConstraints);

        jLPersFechaAlta.setText("FECHA ALTA"); // NOI18N
        jLPersFechaAlta.setName("jLPersFechaAlta"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jLPersFechaAlta, gridBagConstraints);

        jTFPersFechaAlta.setEnabled(false);
        jTFPersFechaAlta.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersFechaAlta.setName("jTFPersFechaAlta"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jTFPersFechaAlta, gridBagConstraints);

        jLPersFechaBaja.setText("FECHA BAJA"); // NOI18N
        jLPersFechaBaja.setName("jLPersFechaBaja"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jLPersFechaBaja, gridBagConstraints);

        jTFPersFechaBaja.setEnabled(false);
        jTFPersFechaBaja.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersFechaBaja.setName("jTFPersFechaBaja"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jTFPersFechaBaja, gridBagConstraints);

        jTFPersDireccion.setText(resourceMap.getString("jTFPersDireccion.text")); // NOI18N
        jTFPersDireccion.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersDireccion.setName("jTFPersDireccion"); // NOI18N
        jTFPersDireccion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersDireccionKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jTFPersDireccion, gridBagConstraints);

        jLPersFechaNacimiento.setText(resourceMap.getString("jLPersFechaNacimiento.text")); // NOI18N
        jLPersFechaNacimiento.setName("jLPersFechaNacimiento"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jLPersFechaNacimiento, gridBagConstraints);

        jLPersDireccion.setText(resourceMap.getString("jLPersDireccion.text")); // NOI18N
        jLPersDireccion.setName("jLPersDireccion"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(7, 0, 0, 0);
        jPanel32.add(jLPersDireccion, gridBagConstraints);

        jLPersLogin.setText(resourceMap.getString("jLPersLogin.text")); // NOI18N
        jLPersLogin.setName("jLPersLogin"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jLPersLogin, gridBagConstraints);

        jTFPersLogin.setText(resourceMap.getString("jTFPersLogin.text")); // NOI18N
        jTFPersLogin.setMaximumSize(new java.awt.Dimension(6, 20));
        jTFPersLogin.setName("jTFPersLogin"); // NOI18N
        jTFPersLogin.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFPersLoginKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jTFPersLogin, gridBagConstraints);

        jPFPersPassword.setText(resourceMap.getString("jPFPersPassword.text")); // NOI18N
        jPFPersPassword.setMaximumSize(new java.awt.Dimension(6, 20));
        jPFPersPassword.setName("jPFPersPassword"); // NOI18N
        jPFPersPassword.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jPFPersPasswordKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jPFPersPassword, gridBagConstraints);

        jLPersPassword.setText(resourceMap.getString("jLPersPassword.text")); // NOI18N
        jLPersPassword.setName("jLPersPassword"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jLPersPassword, gridBagConstraints);

        jCBPersPerfil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Administrador", "Responsable_proyectos", "Responsable_personal", "Responsable_eventos", "No_autorizado" }));
        jCBPersPerfil.setMaximumSize(new java.awt.Dimension(140, 20));
        jCBPersPerfil.setMinimumSize(new java.awt.Dimension(140, 20));
        jCBPersPerfil.setName("jCBPersPerfil"); // NOI18N
        jCBPersPerfil.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jCBPersPerfilItemStateChanged(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jCBPersPerfil, gridBagConstraints);

        jLPersPerfil.setText(resourceMap.getString("jLPersPerfil.text")); // NOI18N
        jLPersPerfil.setName("jLPersPerfil"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jLPersPerfil, gridBagConstraints);

        jFTFPersFechaNacimiento.setText(resourceMap.getString("jFTFPersFechaNacimiento.text")); // NOI18N
        jFTFPersFechaNacimiento.setMaximumSize(new java.awt.Dimension(6, 20));
        jFTFPersFechaNacimiento.setName("jFTFPersFechaNacimiento"); // NOI18N
        jFTFPersFechaNacimiento.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jFTFPersFechaNacimientoKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(7, 15, 0, 0);
        jPanel32.add(jFTFPersFechaNacimiento, gridBagConstraints);

        jPPersFormulario.add(jPanel32, java.awt.BorderLayout.CENTER);

        jTPPers.addTab(resourceMap.getString("jPPersFormulario.TabConstraints.tabTitle"), jPPersFormulario); // NOI18N

        jPPersCurriculum.setMinimumSize(new java.awt.Dimension(100, 100));
        jPPersCurriculum.setName("jPPersCurriculum"); // NOI18N
        jPPersCurriculum.setLayout(new java.awt.BorderLayout());

        jPanel16.setName("jPanel16"); // NOI18N

        Consultar_button1.setText("Consultar"); // NOI18N
        Consultar_button1.setName("Consultar_button1"); // NOI18N
        jPanel16.add(Consultar_button1);

        jPPersCurriculum.add(jPanel16, java.awt.BorderLayout.PAGE_END);

        jScrollPane8.setName("jScrollPane8"); // NOI18N

        Curriculum_text1.setColumns(20);
        Curriculum_text1.setRows(5);
        Curriculum_text1.setName("Curriculum_text1"); // NOI18N
        jScrollPane8.setViewportView(Curriculum_text1);

        jPPersCurriculum.add(jScrollPane8, java.awt.BorderLayout.CENTER);

        jTPPers.addTab(resourceMap.getString("jPPersCurriculum.TabConstraints.tabTitle"), jPPersCurriculum); // NOI18N

        jPPersC.add(jTPPers, java.awt.BorderLayout.CENTER);

        jPPersonal.add(jPPersC);

        jPPersS.setMinimumSize(new java.awt.Dimension(320, 33));
        jPPersS.setName("jPPersS"); // NOI18N
        jPPersS.setPreferredSize(new java.awt.Dimension(640, 33));
        jPPersS.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        jBPersAceptar.setText("Aceptar"); // NOI18N
        jBPersAceptar.setEnabled(false);
        jBPersAceptar.setName("jBPersAceptar"); // NOI18N
        jBPersAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBPersAceptarActionPerformed(evt);
            }
        });
        jPPersS.add(jBPersAceptar);

        jPPersonal.add(jPPersS);

        jPProyectos.setMinimumSize(new java.awt.Dimension(800, 500));
        jPProyectos.setName("jPProyectos"); // NOI18N
        jPProyectos.setPreferredSize(new java.awt.Dimension(900, 600));
        jPProyectos.setLayout(new java.awt.BorderLayout());

        jPProyS.setName("jPProyS"); // NOI18N

        javax.swing.GroupLayout jPProySLayout = new javax.swing.GroupLayout(jPProyS);
        jPProyS.setLayout(jPProySLayout);
        jPProySLayout.setHorizontalGroup(
            jPProySLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 900, Short.MAX_VALUE)
        );
        jPProySLayout.setVerticalGroup(
            jPProySLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 43, Short.MAX_VALUE)
        );

        jPProyectos.add(jPProyS, java.awt.BorderLayout.PAGE_END);

        jTPProyC.setMinimumSize(new java.awt.Dimension(670, 400));
        jTPProyC.setName("jTPProyC"); // NOI18N
        jTPProyC.setPreferredSize(new java.awt.Dimension(1029, 538));

        jTPProyectos.setMinimumSize(new java.awt.Dimension(700, 362));
        jTPProyectos.setName("jTPProyectos"); // NOI18N
        jTPProyectos.setLayout(new java.awt.BorderLayout());

        Arriba_panel.setName("Arriba_panel"); // NOI18N
        Arriba_panel.setPreferredSize(new java.awt.Dimension(100, 20));

        javax.swing.GroupLayout Arriba_panelLayout = new javax.swing.GroupLayout(Arriba_panel);
        Arriba_panel.setLayout(Arriba_panelLayout);
        Arriba_panelLayout.setHorizontalGroup(
            Arriba_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1024, Short.MAX_VALUE)
        );
        Arriba_panelLayout.setVerticalGroup(
            Arriba_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        jTPProyectos.add(Arriba_panel, java.awt.BorderLayout.PAGE_START);

        Abajo_panel.setName("Abajo_panel"); // NOI18N
        Abajo_panel.setPreferredSize(new java.awt.Dimension(100, 20));

        javax.swing.GroupLayout Abajo_panelLayout = new javax.swing.GroupLayout(Abajo_panel);
        Abajo_panel.setLayout(Abajo_panelLayout);
        Abajo_panelLayout.setHorizontalGroup(
            Abajo_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1024, Short.MAX_VALUE)
        );
        Abajo_panelLayout.setVerticalGroup(
            Abajo_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        jTPProyectos.add(Abajo_panel, java.awt.BorderLayout.PAGE_END);

        Izquierda_panell.setName("Izquierda_panell"); // NOI18N
        Izquierda_panell.setPreferredSize(new java.awt.Dimension(20, 100));

        javax.swing.GroupLayout Izquierda_panellLayout = new javax.swing.GroupLayout(Izquierda_panell);
        Izquierda_panell.setLayout(Izquierda_panellLayout);
        Izquierda_panellLayout.setHorizontalGroup(
            Izquierda_panellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );
        Izquierda_panellLayout.setVerticalGroup(
            Izquierda_panellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 489, Short.MAX_VALUE)
        );

        jTPProyectos.add(Izquierda_panell, java.awt.BorderLayout.LINE_START);

        Derecha_panel.setName("Derecha_panel"); // NOI18N
        Derecha_panel.setPreferredSize(new java.awt.Dimension(20, 100));

        javax.swing.GroupLayout Derecha_panelLayout = new javax.swing.GroupLayout(Derecha_panel);
        Derecha_panel.setLayout(Derecha_panelLayout);
        Derecha_panelLayout.setHorizontalGroup(
            Derecha_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );
        Derecha_panelLayout.setVerticalGroup(
            Derecha_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 489, Short.MAX_VALUE)
        );

        jTPProyectos.add(Derecha_panel, java.awt.BorderLayout.LINE_END);

        Central_panel.setName("Central_panel"); // NOI18N
        Central_panel.setLayout(new java.awt.BorderLayout());

        Nortep_panel.setName("Nortep_panel"); // NOI18N
        Nortep_panel.setPreferredSize(new java.awt.Dimension(608, 150));
        Nortep_panel.setLayout(new java.awt.BorderLayout());

        jScrollPane7.setName("jScrollPane7"); // NOI18N

        jTProyectos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "NOMBRE", "COSTE", "SUBVENCIÓN", "F.INICIO", "F.FIN"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTProyectos.setName("jTProyectos"); // NOI18N
        jTProyectos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTProyectosMouseClicked(evt);
            }
        });
        jScrollPane7.setViewportView(jTProyectos);

        Nortep_panel.add(jScrollPane7, java.awt.BorderLayout.CENTER);

        Categoria_panel.setName("Categoria_panel"); // NOI18N
        Categoria_panel.setLayout(new java.awt.GridBagLayout());

        Categoria_label.setText(resourceMap.getString("Categoria_label.text")); // NOI18N
        Categoria_label.setName("Categoria_label"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 10, 0);
        Categoria_panel.add(Categoria_label, gridBagConstraints);

        jCBProyCategoria2.setName("jCBProyCategoria2"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 60;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 20);
        Categoria_panel.add(jCBProyCategoria2, gridBagConstraints);

        jBProyAñadirCategoria.setText(resourceMap.getString("jBProyAñadirCategoria.text")); // NOI18N
        jBProyAñadirCategoria.setName("jBProyAñadirCategoria"); // NOI18N
        jBProyAñadirCategoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyAñadirCategoriaActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.insets = new java.awt.Insets(0, 15, 50, 0);
        Categoria_panel.add(jBProyAñadirCategoria, gridBagConstraints);

        jBProyEliminarCategoria.setText(resourceMap.getString("jBProyEliminarCategoria.text")); // NOI18N
        jBProyEliminarCategoria.setName("jBProyEliminarCategoria"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 50, 0);
        Categoria_panel.add(jBProyEliminarCategoria, gridBagConstraints);

        Nortep_panel.add(Categoria_panel, java.awt.BorderLayout.LINE_END);

        Central_panel.add(Nortep_panel, java.awt.BorderLayout.PAGE_START);

        Centrop_panel.setName("Centrop_panel"); // NOI18N
        Centrop_panel.setPreferredSize(new java.awt.Dimension(984, 320));
        Centrop_panel.setLayout(new java.awt.GridLayout(2, 2));

        Formulario_panel.setName("Formulario_panel"); // NOI18N
        Formulario_panel.setLayout(new java.awt.BorderLayout());

        jPanel20.setName("jPanel20"); // NOI18N
        jPanel20.setPreferredSize(new java.awt.Dimension(90, 100));
        jPanel20.setLayout(new java.awt.GridBagLayout());

        Nombrep_panel.setText(resourceMap.getString("Nombrep_panel.text")); // NOI18N
        Nombrep_panel.setName("Nombrep_panel"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        jPanel20.add(Nombrep_panel, gridBagConstraints);

        jTFProyNombre.setName("jTFProyNombre"); // NOI18N
        jTFProyNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFProyNombreKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 80;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 0);
        jPanel20.add(jTFProyNombre, gridBagConstraints);

        Paisp_label.setText(resourceMap.getString("Paisp_label.text")); // NOI18N
        Paisp_label.setName("Paisp_label"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel20.add(Paisp_label, gridBagConstraints);

        jTFProyPais.setName("jTFProyPais"); // NOI18N
        jTFProyPais.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFProyPaisKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 80;
        gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 0);
        jPanel20.add(jTFProyPais, gridBagConstraints);

        Estadop_label.setText(resourceMap.getString("Estadop_label.text")); // NOI18N
        Estadop_label.setName("Estadop_label"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel20.add(Estadop_label, gridBagConstraints);

        jCBProyEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Pendiente de envio", "Pendiente de aprobacion", "Aprobado", "Denegado", "En curso", "Finalizado", "Cerrado" }));
        jCBProyEstado.setName("jCBProyEstado"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 80;
        gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 0);
        jPanel20.add(jCBProyEstado, gridBagConstraints);

        Categoriap_label.setText(resourceMap.getString("Categoriap_label.text")); // NOI18N
        Categoriap_label.setName("Categoriap_label"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel20.add(Categoriap_label, gridBagConstraints);

        jCBProyCategoria.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "" }));
        jCBProyCategoria.setName("jCBProyCategoria"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 80;
        gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 0);
        jPanel20.add(jCBProyCategoria, gridBagConstraints);

        jLProySubvencion.setText(resourceMap.getString("jLProySubvencion.text")); // NOI18N
        jLProySubvencion.setName("jLProySubvencion"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 70;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 0);
        jPanel20.add(jLProySubvencion, gridBagConstraints);

        jTFProySubvencion.setText(resourceMap.getString("jTFProySubvencion.text")); // NOI18N
        jTFProySubvencion.setEnabled(false);
        jTFProySubvencion.setName("jTFProySubvencion"); // NOI18N
        jTFProySubvencion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFProySubvencionKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 30;
        gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 0);
        jPanel20.add(jTFProySubvencion, gridBagConstraints);

        jBProyCambiarEstado.setText(resourceMap.getString("jBProyCambiarEstado.text")); // NOI18N
        jBProyCambiarEstado.setName("jBProyCambiarEstado"); // NOI18N
        jBProyCambiarEstado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyCambiarEstadoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 73);
        jPanel20.add(jBProyCambiarEstado, gridBagConstraints);

        Formulario_panel.add(jPanel20, java.awt.BorderLayout.CENTER);

        jPanel21.setMinimumSize(new java.awt.Dimension(10, 80));
        jPanel21.setName("jPanel21"); // NOI18N
        jPanel21.setPreferredSize(new java.awt.Dimension(60, 100));
        jPanel21.setRequestFocusEnabled(false);
        jPanel21.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 5, 40));
        Formulario_panel.add(jPanel21, java.awt.BorderLayout.LINE_END);

        Centrop_panel.add(Formulario_panel);

        Imagenes_panel.setName("Imagenes_panel"); // NOI18N
        Imagenes_panel.setLayout(new java.awt.BorderLayout());

        jPanel18.setName("jPanel18"); // NOI18N
        jPanel18.setPreferredSize(new java.awt.Dimension(100, 40));
        jPanel18.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 20, 20));

        Imagenesp_label1.setText(resourceMap.getString("Imagenesp_label1.text")); // NOI18N
        Imagenesp_label1.setName("Imagenesp_label1"); // NOI18N
        jPanel18.add(Imagenesp_label1);

        Imagenes_panel.add(jPanel18, java.awt.BorderLayout.PAGE_START);

        jPanel19.setName("jPanel19"); // NOI18N
        jPanel19.setPreferredSize(new java.awt.Dimension(80, 100));
        jPanel19.setLayout(new java.awt.GridBagLayout());

        jBProyAñadirImagen.setText(resourceMap.getString("jBProyAñadirImagen.text")); // NOI18N
        jBProyAñadirImagen.setName("jBProyAñadirImagen"); // NOI18N
        jPanel19.add(jBProyAñadirImagen, new java.awt.GridBagConstraints());

        jBProyEliminarImagen.setText(resourceMap.getString("jBProyEliminarImagen.text")); // NOI18N
        jBProyEliminarImagen.setName("jBProyEliminarImagen"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(20, 0, 0, 0);
        jPanel19.add(jBProyEliminarImagen, gridBagConstraints);

        Imagenes_panel.add(jPanel19, java.awt.BorderLayout.LINE_END);

        jPanel22.setName("jPanel22"); // NOI18N
        jPanel22.setPreferredSize(new java.awt.Dimension(140, 100));

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 140, Short.MAX_VALUE)
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        Imagenes_panel.add(jPanel22, java.awt.BorderLayout.LINE_START);

        jPanel23.setName("jPanel23"); // NOI18N
        jPanel23.setPreferredSize(new java.awt.Dimension(100, 20));

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 492, Short.MAX_VALUE)
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        Imagenes_panel.add(jPanel23, java.awt.BorderLayout.PAGE_END);

        jPanel39.setName("jPanel39"); // NOI18N
        jPanel39.setLayout(new java.awt.BorderLayout());

        jLProyImagen.setText(resourceMap.getString("jLProyImagen.text")); // NOI18N
        jLProyImagen.setName("jLProyImagen"); // NOI18N
        jPanel39.add(jLProyImagen, java.awt.BorderLayout.CENTER);

        Imagenes_panel.add(jPanel39, java.awt.BorderLayout.CENTER);

        Centrop_panel.add(Imagenes_panel);

        Descripcionp_panel.setName("Descripcionp_panel"); // NOI18N
        Descripcionp_panel.setLayout(new java.awt.BorderLayout());

        jScrollPane10.setName("jScrollPane10"); // NOI18N

        jTAProyDescripcion.setColumns(20);
        jTAProyDescripcion.setRows(5);
        jTAProyDescripcion.setName("jTAProyDescripcion"); // NOI18N
        jTAProyDescripcion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTAProyDescripcionKeyTyped(evt);
            }
        });
        jScrollPane10.setViewportView(jTAProyDescripcion);

        Descripcionp_panel.add(jScrollPane10, java.awt.BorderLayout.CENTER);

        jPanel17.setName("jPanel17"); // NOI18N
        jPanel17.setPreferredSize(new java.awt.Dimension(120, 100));

        Descripcionp_label.setText(resourceMap.getString("Descripcionp_label.text")); // NOI18N
        Descripcionp_label.setName("Descripcionp_label"); // NOI18N
        jPanel17.add(Descripcionp_label);

        Descripcionp_panel.add(jPanel17, java.awt.BorderLayout.LINE_START);

        Centrop_panel.add(Descripcionp_panel);

        Responsable_panel.setName("Responsable_panel"); // NOI18N
        Responsable_panel.setLayout(new java.awt.GridBagLayout());

        Responsablep_label.setText(resourceMap.getString("Responsablep_label.text")); // NOI18N
        Responsablep_label.setName("Responsablep_label"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 10);
        Responsable_panel.add(Responsablep_label, gridBagConstraints);

        jTFProyResponsable.setEnabled(false);
        jTFProyResponsable.setName("jTFProyResponsable"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 140;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
        Responsable_panel.add(jTFProyResponsable, gridBagConstraints);

        jBProyFijarResponsable.setText(resourceMap.getString("jBProyFijarResponsable.text")); // NOI18N
        jBProyFijarResponsable.setName("jBProyFijarResponsable"); // NOI18N
        jBProyFijarResponsable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyFijarResponsableActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(10, 20, 0, 0);
        Responsable_panel.add(jBProyFijarResponsable, gridBagConstraints);

        jBProyNuevo.setText(resourceMap.getString("jBProyNuevo.text")); // NOI18N
        jBProyNuevo.setName("jBProyNuevo"); // NOI18N
        jBProyNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyNuevoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.insets = new java.awt.Insets(60, 0, 10, 0);
        Responsable_panel.add(jBProyNuevo, gridBagConstraints);

        jBProyBuscar.setText(resourceMap.getString("jBProyBuscar.text")); // NOI18N
        jBProyBuscar.setName("jBProyBuscar"); // NOI18N
        jBProyBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyBuscarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.insets = new java.awt.Insets(60, 0, 10, 0);
        Responsable_panel.add(jBProyBuscar, gridBagConstraints);

        jBProyGuardar.setText(resourceMap.getString("jBProyGuardar.text")); // NOI18N
        jBProyGuardar.setName("jBProyGuardar"); // NOI18N
        jBProyGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyGuardarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.insets = new java.awt.Insets(60, 0, 10, 0);
        Responsable_panel.add(jBProyGuardar, gridBagConstraints);

        jBProyEliminar.setText(resourceMap.getString("jBProyEliminar.text")); // NOI18N
        jBProyEliminar.setName("jBProyEliminar"); // NOI18N
        jBProyEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProyEliminarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.insets = new java.awt.Insets(60, 0, 10, 0);
        Responsable_panel.add(jBProyEliminar, gridBagConstraints);

        Centrop_panel.add(Responsable_panel);

        Central_panel.add(Centrop_panel, java.awt.BorderLayout.PAGE_END);

        Separador_panel.setName("Separador_panel"); // NOI18N
        Separador_panel.setRequestFocusEnabled(false);

        javax.swing.GroupLayout Separador_panelLayout = new javax.swing.GroupLayout(Separador_panel);
        Separador_panel.setLayout(Separador_panelLayout);
        Separador_panelLayout.setHorizontalGroup(
            Separador_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 984, Short.MAX_VALUE)
        );
        Separador_panelLayout.setVerticalGroup(
            Separador_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 19, Short.MAX_VALUE)
        );

        Central_panel.add(Separador_panel, java.awt.BorderLayout.CENTER);

        jTPProyectos.add(Central_panel, java.awt.BorderLayout.CENTER);

        jTPProyC.addTab(resourceMap.getString("jTPProyectos.TabConstraints.tabTitle"), jTPProyectos); // NOI18N

        jTPTareas.setName("jTPTareas"); // NOI18N
        jTPTareas.setLayout(new java.awt.BorderLayout());

        Ntareas_panel.setMinimumSize(new java.awt.Dimension(100, 100));
        Ntareas_panel.setName("Ntareas_panel"); // NOI18N
        Ntareas_panel.setPreferredSize(new java.awt.Dimension(100, 160));
        Ntareas_panel.setRequestFocusEnabled(false);
        Ntareas_panel.setLayout(new java.awt.BorderLayout());

        jPanel14.setName("jPanel14"); // NOI18N

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        Ntareas_panel.add(jPanel14, java.awt.BorderLayout.PAGE_START);

        jPanel15.setMinimumSize(new java.awt.Dimension(0, 200));
        jPanel15.setName("jPanel15"); // NOI18N

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 160, Short.MAX_VALUE)
        );

        Ntareas_panel.add(jPanel15, java.awt.BorderLayout.LINE_START);

        Botones_panel.setName("Botones_panel"); // NOI18N
        Botones_panel.setLayout(new java.awt.GridBagLayout());

        jBTarIniciar.setText(resourceMap.getString("jBTarIniciar.text")); // NOI18N
        jBTarIniciar.setEnabled(false);
        jBTarIniciar.setName("jBTarIniciar"); // NOI18N
        jBTarIniciar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarIniciarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 20);
        Botones_panel.add(jBTarIniciar, gridBagConstraints);

        jBTarFinalizar.setText(resourceMap.getString("jBTarFinalizar.text")); // NOI18N
        jBTarFinalizar.setEnabled(false);
        jBTarFinalizar.setName("jBTarFinalizar"); // NOI18N
        jBTarFinalizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarFinalizarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 0);
        Botones_panel.add(jBTarFinalizar, gridBagConstraints);

        jBTarEliminar.setText(resourceMap.getString("jBTarEliminar.text")); // NOI18N
        jBTarEliminar.setEnabled(false);
        jBTarEliminar.setName("jBTarEliminar"); // NOI18N
        jBTarEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarEliminarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        Botones_panel.add(jBTarEliminar, gridBagConstraints);

        Ntareas_panel.add(Botones_panel, java.awt.BorderLayout.LINE_END);

        jScrollPane6.setMinimumSize(new java.awt.Dimension(23, 223));
        jScrollPane6.setName("jScrollPane6"); // NOI18N
        jScrollPane6.setPreferredSize(new java.awt.Dimension(400, 350));

        jTTareas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "NOMBRE", "ESTADO", "F.INICIO", "F.FIN", "PRESUPUESTO", "GASTOS"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTTareas.setName("jTTareas"); // NOI18N
        jTTareas.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTTareasMouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(jTTareas);

        Ntareas_panel.add(jScrollPane6, java.awt.BorderLayout.CENTER);

        jTPTareas.add(Ntareas_panel, java.awt.BorderLayout.PAGE_START);

        Stareas_panel.setMinimumSize(new java.awt.Dimension(100, 100));
        Stareas_panel.setName("Stareas_panel"); // NOI18N
        Stareas_panel.setPreferredSize(new java.awt.Dimension(100, 150));
        Stareas_panel.setLayout(new java.awt.BorderLayout());

        jPanel8.setName("jPanel8"); // NOI18N
        jPanel8.setPreferredSize(new java.awt.Dimension(50, 50));

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 130, Short.MAX_VALUE)
        );

        Stareas_panel.add(jPanel8, java.awt.BorderLayout.CENTER);

        Contratados_panel.setMinimumSize(new java.awt.Dimension(100, 85));
        Contratados_panel.setName("Contratados_panel"); // NOI18N
        Contratados_panel.setPreferredSize(new java.awt.Dimension(400, 500));
        Contratados_panel.setLayout(new java.awt.BorderLayout());

        jPanel9.setName("jPanel9"); // NOI18N
        jPanel9.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        Contratados_label.setText(resourceMap.getString("Contratados_label.text")); // NOI18N
        Contratados_label.setName("Contratados_label"); // NOI18N
        jPanel9.add(Contratados_label);

        Contratados_panel.add(jPanel9, java.awt.BorderLayout.PAGE_START);

        jPanel10.setName("jPanel10"); // NOI18N
        jPanel10.setLayout(new java.awt.GridBagLayout());

        jBTarAñadirContratado.setText(resourceMap.getString("jBTarAñadirContratado.text")); // NOI18N
        jBTarAñadirContratado.setEnabled(false);
        jBTarAñadirContratado.setName("jBTarAñadirContratado"); // NOI18N
        jBTarAñadirContratado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarAñadirContratadoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 20);
        jPanel10.add(jBTarAñadirContratado, gridBagConstraints);

        jBTarFinalizarContratado.setText(resourceMap.getString("jBTarFinalizarContratado.text")); // NOI18N
        jBTarFinalizarContratado.setEnabled(false);
        jBTarFinalizarContratado.setName("jBTarFinalizarContratado"); // NOI18N
        jBTarFinalizarContratado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarFinalizarContratadoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        jPanel10.add(jBTarFinalizarContratado, gridBagConstraints);

        Contratados_panel.add(jPanel10, java.awt.BorderLayout.LINE_END);

        jScrollPane4.setName("jScrollPane4"); // NOI18N
        jScrollPane4.setPreferredSize(new java.awt.Dimension(400, 402));

        jTContratados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "E", "NOMBRE Y APELLIDOS"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTContratados.setName("jTContratados"); // NOI18N
        jScrollPane4.setViewportView(jTContratados);
        jTContratados.getColumnModel().getColumn(0).setResizable(false);
        jTContratados.getColumnModel().getColumn(0).setPreferredWidth(30);
        jTContratados.getColumnModel().getColumn(1).setResizable(false);
        jTContratados.getColumnModel().getColumn(1).setPreferredWidth(400);

        Contratados_panel.add(jScrollPane4, java.awt.BorderLayout.CENTER);

        Stareas_panel.add(Contratados_panel, java.awt.BorderLayout.LINE_END);

        Gastos_panel.setMinimumSize(new java.awt.Dimension(100, 85));
        Gastos_panel.setName("Gastos_panel"); // NOI18N
        Gastos_panel.setPreferredSize(new java.awt.Dimension(550, 400));
        Gastos_panel.setLayout(new java.awt.BorderLayout());

        jPanel11.setName("jPanel11"); // NOI18N

        Gastos_label.setText(resourceMap.getString("Gastos_label.text")); // NOI18N
        Gastos_label.setName("Gastos_label"); // NOI18N
        jPanel11.add(Gastos_label);

        Gastos_panel.add(jPanel11, java.awt.BorderLayout.PAGE_START);

        jPanel12.setName("jPanel12"); // NOI18N

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 106, Short.MAX_VALUE)
        );

        Gastos_panel.add(jPanel12, java.awt.BorderLayout.LINE_END);

        jPanel13.setName("jPanel13"); // NOI18N
        jPanel13.setPreferredSize(new java.awt.Dimension(230, 61));
        jPanel13.setLayout(new java.awt.BorderLayout());

        jPanel29.setName("jPanel29"); // NOI18N
        jPanel29.setLayout(new java.awt.GridBagLayout());

        jBTarEliminarGasto.setText(resourceMap.getString("jBTarEliminarGasto.text")); // NOI18N
        jBTarEliminarGasto.setEnabled(false);
        jBTarEliminarGasto.setName("jBTarEliminarGasto"); // NOI18N
        jBTarEliminarGasto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarEliminarGastoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        jPanel29.add(jBTarEliminarGasto, gridBagConstraints);

        jBTarAñadirGasto.setText(resourceMap.getString("jBTarAñadirGasto.text")); // NOI18N
        jBTarAñadirGasto.setEnabled(false);
        jBTarAñadirGasto.setName("jBTarAñadirGasto"); // NOI18N
        jBTarAñadirGasto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarAñadirGastoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 20);
        jPanel29.add(jBTarAñadirGasto, gridBagConstraints);

        jPanel13.add(jPanel29, java.awt.BorderLayout.CENTER);

        jPanel30.setName("jPanel30"); // NOI18N
        jPanel30.setPreferredSize(new java.awt.Dimension(150, 50));

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 150, Short.MAX_VALUE)
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 106, Short.MAX_VALUE)
        );

        jPanel13.add(jPanel30, java.awt.BorderLayout.LINE_START);

        Gastos_panel.add(jPanel13, java.awt.BorderLayout.LINE_START);

        jScrollPane5.setName("jScrollPane5"); // NOI18N
        jScrollPane5.setPreferredSize(new java.awt.Dimension(450, 450));

        jTGastos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "DETALLE", "DINERO(€)"
            }
        ));
        jTGastos.setName("jTGastos"); // NOI18N
        jTGastos.setPreferredSize(new java.awt.Dimension(250, 64));
        jScrollPane5.setViewportView(jTGastos);

        Gastos_panel.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        Stareas_panel.add(Gastos_panel, java.awt.BorderLayout.LINE_START);

        jPanel25.setName("jPanel25"); // NOI18N
        jPanel25.setPreferredSize(new java.awt.Dimension(10, 20));

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        Stareas_panel.add(jPanel25, java.awt.BorderLayout.PAGE_END);

        jTPTareas.add(Stareas_panel, java.awt.BorderLayout.PAGE_END);

        Ctareas_panel.setMinimumSize(new java.awt.Dimension(100, 80));
        Ctareas_panel.setName("Ctareas_panel"); // NOI18N
        Ctareas_panel.setPreferredSize(new java.awt.Dimension(100, 80));
        Ctareas_panel.setLayout(new java.awt.BorderLayout());

        centro_abajo_panel.setName("centro_abajo_panel"); // NOI18N
        centro_abajo_panel.setPreferredSize(new java.awt.Dimension(0, 25));

        javax.swing.GroupLayout centro_abajo_panelLayout = new javax.swing.GroupLayout(centro_abajo_panel);
        centro_abajo_panel.setLayout(centro_abajo_panelLayout);
        centro_abajo_panelLayout.setHorizontalGroup(
            centro_abajo_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        centro_abajo_panelLayout.setVerticalGroup(
            centro_abajo_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        Ctareas_panel.add(centro_abajo_panel, java.awt.BorderLayout.PAGE_END);

        Centro_arriba_panel.setName("Centro_arriba_panel"); // NOI18N
        Centro_arriba_panel.setPreferredSize(new java.awt.Dimension(0, 25));

        javax.swing.GroupLayout Centro_arriba_panelLayout = new javax.swing.GroupLayout(Centro_arriba_panel);
        Centro_arriba_panel.setLayout(Centro_arriba_panelLayout);
        Centro_arriba_panelLayout.setHorizontalGroup(
            Centro_arriba_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        Centro_arriba_panelLayout.setVerticalGroup(
            Centro_arriba_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        Ctareas_panel.add(Centro_arriba_panel, java.awt.BorderLayout.PAGE_START);

        Rellenar_campos_panel.setMinimumSize(new java.awt.Dimension(285, 100));
        Rellenar_campos_panel.setName("Rellenar_campos_panel"); // NOI18N
        Rellenar_campos_panel.setPreferredSize(new java.awt.Dimension(375, 146));
        Rellenar_campos_panel.setRequestFocusEnabled(false);
        Rellenar_campos_panel.setLayout(new java.awt.GridBagLayout());

        jLTarNombre.setText(resourceMap.getString("jLTarNombre.text")); // NOI18N
        jLTarNombre.setName("jLTarNombre"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(5, 20, 10, 0);
        Rellenar_campos_panel.add(jLTarNombre, gridBagConstraints);

        jTFTarNombre.setName("jTFTarNombre"); // NOI18N
        jTFTarNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFTarNombreKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 13;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 10, 5);
        Rellenar_campos_panel.add(jTFTarNombre, gridBagConstraints);

        jLTarPresupuesto.setText(resourceMap.getString("jLTarPresupuesto.text")); // NOI18N
        jLTarPresupuesto.setName("jLTarPresupuesto"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 10, 0);
        Rellenar_campos_panel.add(jLTarPresupuesto, gridBagConstraints);

        jTFTarPresupuesto.setName("jTFTarPresupuesto"); // NOI18N
        jTFTarPresupuesto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFTarPresupuestoKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 10, 5);
        Rellenar_campos_panel.add(jTFTarPresupuesto, gridBagConstraints);

        jLTarDirector.setText(resourceMap.getString("jLTarDirector.text")); // NOI18N
        jLTarDirector.setName("jLTarDirector"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 10, 0);
        Rellenar_campos_panel.add(jLTarDirector, gridBagConstraints);

        jTFTarDirector.setName("jTFTarDirector"); // NOI18N
        jTFTarDirector.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFTarDirectorKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 10;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 10, 5);
        Rellenar_campos_panel.add(jTFTarDirector, gridBagConstraints);

        jBTarFijarDirector.setText(resourceMap.getString("jBTarFijarDirector.text")); // NOI18N
        jBTarFijarDirector.setEnabled(false);
        jBTarFijarDirector.setName("jBTarFijarDirector"); // NOI18N
        jBTarFijarDirector.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarFijarDirectorActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 2, 10, 11);
        Rellenar_campos_panel.add(jBTarFijarDirector, gridBagConstraints);

        jBTarNuevo.setText(resourceMap.getString("jBTarNuevo.text")); // NOI18N
        jBTarNuevo.setEnabled(false);
        jBTarNuevo.setName("jBTarNuevo"); // NOI18N
        jBTarNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarNuevoActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.insets = new java.awt.Insets(0, 25, 0, 20);
        Rellenar_campos_panel.add(jBTarNuevo, gridBagConstraints);

        jBTarGuardar.setText(resourceMap.getString("jBTarGuardar.text")); // NOI18N
        jBTarGuardar.setEnabled(false);
        jBTarGuardar.setName("jBTarGuardar"); // NOI18N
        jBTarGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarGuardarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 25);
        Rellenar_campos_panel.add(jBTarGuardar, gridBagConstraints);

        jLTarTipo.setText(resourceMap.getString("jLTarTipo.text")); // NOI18N
        jLTarTipo.setName("jLTarTipo"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 0);
        Rellenar_campos_panel.add(jLTarTipo, gridBagConstraints);

        jCBTarTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Voluntario", "Contratado" }));
        jCBTarTipo.setName("jCBTarTipo"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 22;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        Rellenar_campos_panel.add(jCBTarTipo, gridBagConstraints);

        Ctareas_panel.add(Rellenar_campos_panel, java.awt.BorderLayout.LINE_START);

        Descripcion_panel.setMinimumSize(new java.awt.Dimension(40, 0));
        Descripcion_panel.setName("Descripcion_panel"); // NOI18N
        Descripcion_panel.setPreferredSize(new java.awt.Dimension(20, 0));
        Descripcion_panel.setLayout(new java.awt.BorderLayout());

        jPanel1.setName("jPanel1"); // NOI18N

        Descripcion_label.setText(resourceMap.getString("Descripcion_label.text")); // NOI18N
        Descripcion_label.setName("Descripcion_label"); // NOI18N
        jPanel1.add(Descripcion_label);

        Descripcion_panel.add(jPanel1, java.awt.BorderLayout.PAGE_START);

        jPanel2.setName("jPanel2"); // NOI18N
        jPanel2.setPreferredSize(new java.awt.Dimension(20, 0));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 145, Short.MAX_VALUE)
        );

        Descripcion_panel.add(jPanel2, java.awt.BorderLayout.LINE_START);

        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setPreferredSize(new java.awt.Dimension(20, 0));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 145, Short.MAX_VALUE)
        );

        Descripcion_panel.add(jPanel4, java.awt.BorderLayout.LINE_END);

        jScrollPane2.setName("jScrollPane2"); // NOI18N
        jScrollPane2.setPreferredSize(new java.awt.Dimension(90, 76));

        jTFTarDescripcion.setColumns(20);
        jTFTarDescripcion.setRows(5);
        jTFTarDescripcion.setName("jTFTarDescripcion"); // NOI18N
        jTFTarDescripcion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFTarDescripcionKeyTyped(evt);
            }
        });
        jScrollPane2.setViewportView(jTFTarDescripcion);

        Descripcion_panel.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        Ctareas_panel.add(Descripcion_panel, java.awt.BorderLayout.CENTER);

        Voluntarios_panel.setMinimumSize(new java.awt.Dimension(100, 85));
        Voluntarios_panel.setName("Voluntarios_panel"); // NOI18N
        Voluntarios_panel.setPreferredSize(new java.awt.Dimension(400, 100));
        Voluntarios_panel.setLayout(new java.awt.BorderLayout());

        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        Voluntarios_label.setText(resourceMap.getString("Voluntarios_label.text")); // NOI18N
        Voluntarios_label.setName("Voluntarios_label"); // NOI18N
        jPanel6.add(Voluntarios_label);

        Voluntarios_panel.add(jPanel6, java.awt.BorderLayout.PAGE_START);

        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setLayout(new java.awt.GridBagLayout());

        jBTarAñadirVoluntario.setText(resourceMap.getString("jBTarAñadirVoluntario.text")); // NOI18N
        jBTarAñadirVoluntario.setEnabled(false);
        jBTarAñadirVoluntario.setName("jBTarAñadirVoluntario"); // NOI18N
        jBTarAñadirVoluntario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarAñadirVoluntarioActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 20);
        jPanel7.add(jBTarAñadirVoluntario, gridBagConstraints);

        jBTarFinalizarVoluntario.setText(resourceMap.getString("jBTarFinalizarVoluntario.text")); // NOI18N
        jBTarFinalizarVoluntario.setEnabled(false);
        jBTarFinalizarVoluntario.setName("jBTarFinalizarVoluntario"); // NOI18N
        jBTarFinalizarVoluntario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBTarFinalizarVoluntarioActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        jPanel7.add(jBTarFinalizarVoluntario, gridBagConstraints);

        Voluntarios_panel.add(jPanel7, java.awt.BorderLayout.LINE_END);

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jTVoluntarios.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "E", "NOMBRE Y APELLIDOS"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTVoluntarios.setName("jTVoluntarios"); // NOI18N
        jScrollPane3.setViewportView(jTVoluntarios);
        jTVoluntarios.getColumnModel().getColumn(0).setResizable(false);
        jTVoluntarios.getColumnModel().getColumn(0).setPreferredWidth(30);
        jTVoluntarios.getColumnModel().getColumn(1).setResizable(false);
        jTVoluntarios.getColumnModel().getColumn(1).setPreferredWidth(400);

        Voluntarios_panel.add(jScrollPane3, java.awt.BorderLayout.CENTER);

        Ctareas_panel.add(Voluntarios_panel, java.awt.BorderLayout.LINE_END);

        jTPTareas.add(Ctareas_panel, java.awt.BorderLayout.CENTER);

        jTPProyC.addTab(resourceMap.getString("jTPTareas.TabConstraints.tabTitle"), jTPTareas); // NOI18N

        jPProyectos.add(jTPProyC, java.awt.BorderLayout.CENTER);

        jPEventos.setMinimumSize(new java.awt.Dimension(600, 400));
        jPEventos.setName("jPEventos"); // NOI18N
        jPEventos.setPreferredSize(new java.awt.Dimension(700, 600));
        jPEventos.setLayout(new java.awt.BorderLayout());

        jPEvenE.setMinimumSize(new java.awt.Dimension(400, 23));
        jPEvenE.setName("jPEvenE"); // NOI18N
        jPEvenE.setPreferredSize(new java.awt.Dimension(240, 23));
        jPEvenE.setLayout(new java.awt.GridBagLayout());

        jTFEvenNombre.setText(resourceMap.getString("jTFEvenNombre.text")); // NOI18N
        jTFEvenNombre.setName("jTFEvenNombre"); // NOI18N
        jTFEvenNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFEvenNombreKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 8, 10);
        jPEvenE.add(jTFEvenNombre, gridBagConstraints);

        jCBEvenEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "En espera de inicio", "En Curso", "Finalizado", "Cancelado" }));
        jCBEvenEstado.setName("jCBEvenEstado"); // NOI18N
        jCBEvenEstado.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jCBEvenEstadoItemStateChanged(evt);
            }
        });
        jCBEvenEstado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jCBEvenEstadoKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jCBEvenEstado, gridBagConstraints);

        jTFEvenDuracion.setText(resourceMap.getString("jTFEvenDuracion.text")); // NOI18N
        jTFEvenDuracion.setName("jTFEvenDuracion"); // NOI18N
        jTFEvenDuracion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFEvenDuracionKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jTFEvenDuracion, gridBagConstraints);

        jLEvenNombre.setText(resourceMap.getString("jLEvenNombre.text")); // NOI18N
        jLEvenNombre.setName("jLEvenNombre"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 8, 0);
        jPEvenE.add(jLEvenNombre, gridBagConstraints);

        jLEvenEstado.setText(resourceMap.getString("jLEvenEstado.text")); // NOI18N
        jLEvenEstado.setName("jLEvenEstado"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jLEvenEstado, gridBagConstraints);

        jLEvenDuracion.setText(resourceMap.getString("jLEvenDuracion.text")); // NOI18N
        jLEvenDuracion.setName("jLEvenDuracion"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jLEvenDuracion, gridBagConstraints);

        jLEvenFechaInicio.setText(resourceMap.getString("jLEvenFechaInicio.text")); // NOI18N
        jLEvenFechaInicio.setName("jLEvenFechaInicio"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jLEvenFechaInicio, gridBagConstraints);

        jLEvenFechaFin.setText(resourceMap.getString("jLEvenFechaFin.text")); // NOI18N
        jLEvenFechaFin.setName("jLEvenFechaFin"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jLEvenFechaFin, gridBagConstraints);

        jLEvenResponsable.setText(resourceMap.getString("jLEvenResponsable.text")); // NOI18N
        jLEvenResponsable.setName("jLEvenResponsable"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jLEvenResponsable, gridBagConstraints);

        jFTFEvenFechaInicio.setText(resourceMap.getString("jFTFEvenFechaInicio.text")); // NOI18N
        jFTFEvenFechaInicio.setName("jFTFEvenFechaInicio"); // NOI18N
        jFTFEvenFechaInicio.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jFTFEvenFechaInicioKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jFTFEvenFechaInicio, gridBagConstraints);

        jFTFEvenFechaFin.setEditable(false);
        jFTFEvenFechaFin.setText(resourceMap.getString("jFTFEvenFechaFin.text")); // NOI18N
        jFTFEvenFechaFin.setName("jFTFEvenFechaFin"); // NOI18N
        jFTFEvenFechaFin.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jFTFEvenFechaFinKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jFTFEvenFechaFin, gridBagConstraints);

        jBEvenFijarResponsable.setText(resourceMap.getString("jBEvenFijarResponsable.text")); // NOI18N
        jBEvenFijarResponsable.setName("jBEvenFijarResponsable"); // NOI18N
        jBEvenFijarResponsable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEvenFijarResponsableActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 9;
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 85);
        jPEvenE.add(jBEvenFijarResponsable, gridBagConstraints);

        jLEvenTipo.setText(resourceMap.getString("jLEvenTipo.text")); // NOI18N
        jLEvenTipo.setName("jLEvenTipo"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jLEvenTipo, gridBagConstraints);

        jCBEvenTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "Publico", "Privado" }));
        jCBEvenTipo.setName("jCBEvenTipo"); // NOI18N
        jCBEvenTipo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jCBEvenTipoKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jCBEvenTipo, gridBagConstraints);

        jTFEvenResponsable.setText(resourceMap.getString("jTFEvenResponsable.text")); // NOI18N
        jTFEvenResponsable.setEnabled(false);
        jTFEvenResponsable.setName("jTFEvenResponsable"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jTFEvenResponsable, gridBagConstraints);

        jLEvenLugar.setText(resourceMap.getString("jLEvenLugar.text")); // NOI18N
        jLEvenLugar.setName("jLEvenLugar"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
        jPEvenE.add(jLEvenLugar, gridBagConstraints);

        jTFEvenLugar.setText(resourceMap.getString("jTFEvenLugar.text")); // NOI18N
        jTFEvenLugar.setName("jTFEvenLugar"); // NOI18N
        jTFEvenLugar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFEvenLugarKeyTyped(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 10);
        jPEvenE.add(jTFEvenLugar, gridBagConstraints);

        jPEventos.add(jPEvenE, java.awt.BorderLayout.EAST);

        jPEvenS.setName("jPEvenS"); // NOI18N
        jPEvenS.setPreferredSize(new java.awt.Dimension(419, 200));
        jPEvenS.setLayout(new java.awt.GridLayout(1, 0));

        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setLayout(new java.awt.BorderLayout());

        jScrollPane11.setName("jScrollPane11"); // NOI18N

        jTAEvenDescripcion.setColumns(20);
        jTAEvenDescripcion.setRows(5);
        jTAEvenDescripcion.setName("jTAEvenDescripcion"); // NOI18N
        jTAEvenDescripcion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTAEvenDescripcionKeyTyped(evt);
            }
        });
        jScrollPane11.setViewportView(jTAEvenDescripcion);

        jPanel3.add(jScrollPane11, java.awt.BorderLayout.CENTER);

        jPanel24.setMinimumSize(new java.awt.Dimension(79, 20));
        jPanel24.setName("jPanel24"); // NOI18N
        jPanel24.setPreferredSize(new java.awt.Dimension(100, 20));
        jPanel24.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        jLEvenDescripcion.setText(resourceMap.getString("jLEvenDescripcion.text")); // NOI18N
        jLEvenDescripcion.setName("jLEvenDescripcion"); // NOI18N
        jPanel24.add(jLEvenDescripcion);

        jPanel3.add(jPanel24, java.awt.BorderLayout.PAGE_START);

        jPEvenS.add(jPanel3);

        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 100));

        jBEvenNuevo.setText(resourceMap.getString("jBEvenNuevo.text")); // NOI18N
        jBEvenNuevo.setName("jBEvenNuevo"); // NOI18N
        jBEvenNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEvenNuevoActionPerformed(evt);
            }
        });
        jPanel5.add(jBEvenNuevo);

        jBEvenBuscar.setText(resourceMap.getString("jBEvenBuscar.text")); // NOI18N
        jBEvenBuscar.setName("jBEvenBuscar"); // NOI18N
        jBEvenBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEvenBuscarActionPerformed(evt);
            }
        });
        jPanel5.add(jBEvenBuscar);

        jBEvenGuardar.setText(resourceMap.getString("jBEvenGuardar.text")); // NOI18N
        jBEvenGuardar.setName("jBEvenGuardar"); // NOI18N
        jBEvenGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEvenGuardarActionPerformed(evt);
            }
        });
        jPanel5.add(jBEvenGuardar);

        jBEvenCancelar.setText(resourceMap.getString("jBEvenCancelar.text")); // NOI18N
        jBEvenCancelar.setName("jBEvenCancelar"); // NOI18N
        jBEvenCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEvenCancelarActionPerformed(evt);
            }
        });
        jPanel5.add(jBEvenCancelar);

        jPEvenS.add(jPanel5);

        jPEventos.add(jPEvenS, java.awt.BorderLayout.PAGE_END);

        jPEvenC.setName("jPEvenC"); // NOI18N
        jPEvenC.setLayout(new java.awt.BorderLayout());

        jScrollPane12.setName("jScrollPane12"); // NOI18N

        jTEventos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "NOMBRE", "TIPO", "ESTADO", "DURACIÓN", "F.INICIO", "F.FIN"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTEventos.setName("jTEventos"); // NOI18N
        jTEventos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTEventosMouseClicked(evt);
            }
        });
        jScrollPane12.setViewportView(jTEventos);
        jTEventos.getColumnModel().getColumn(0).setResizable(false);
        jTEventos.getColumnModel().getColumn(1).setResizable(false);
        jTEventos.getColumnModel().getColumn(2).setResizable(false);
        jTEventos.getColumnModel().getColumn(3).setResizable(false);
        jTEventos.getColumnModel().getColumn(4).setResizable(false);
        jTEventos.getColumnModel().getColumn(5).setResizable(false);

        jPEvenC.add(jScrollPane12, java.awt.BorderLayout.CENTER);

        jPanel26.setName("jPanel26"); // NOI18N
        jPanel26.setPreferredSize(new java.awt.Dimension(100, 5));

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 462, Short.MAX_VALUE)
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 5, Short.MAX_VALUE)
        );

        jPEvenC.add(jPanel26, java.awt.BorderLayout.PAGE_START);

        jPanel27.setName("jPanel27"); // NOI18N
        jPanel27.setPreferredSize(new java.awt.Dimension(5, 100));

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 5, Short.MAX_VALUE)
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 423, Short.MAX_VALUE)
        );

        jPEvenC.add(jPanel27, java.awt.BorderLayout.LINE_START);

        jPanel28.setName("jPanel28"); // NOI18N
        jPanel28.setPreferredSize(new java.awt.Dimension(5, 100));

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 5, Short.MAX_VALUE)
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 423, Short.MAX_VALUE)
        );

        jPEvenC.add(jPanel28, java.awt.BorderLayout.LINE_END);

        jPEventos.add(jPEvenC, java.awt.BorderLayout.CENTER);

        jPDonaciones.setBackground(resourceMap.getColor("jPDonaciones.background")); // NOI18N
        jPDonaciones.setName("jPDonaciones"); // NOI18N

        javax.swing.GroupLayout jPDonacionesLayout = new javax.swing.GroupLayout(jPDonaciones);
        jPDonaciones.setLayout(jPDonacionesLayout);
        jPDonacionesLayout.setHorizontalGroup(
            jPDonacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 700, Short.MAX_VALUE)
        );
        jPDonacionesLayout.setVerticalGroup(
            jPDonacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 458, Short.MAX_VALUE)
        );

        jPONG.setBackground(resourceMap.getColor("jPONG.background")); // NOI18N
        jPONG.setName("jPONG"); // NOI18N
        jPONG.setLayout(new java.awt.BorderLayout());

        jPanel33.setName("jPanel33"); // NOI18N
        jPanel33.setPreferredSize(new java.awt.Dimension(20, 100));
        jPanel33.setLayout(new java.awt.GridBagLayout());

        jLONGNombre.setText(resourceMap.getString("jLONGNombre.text")); // NOI18N
        jLONGNombre.setName("jLONGNombre"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 15);
        jPanel33.add(jLONGNombre, gridBagConstraints);

        jTFONGNombre.setName("jTFONGNombre"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jTFONGNombre, gridBagConstraints);

        jLONGDireccion.setText(resourceMap.getString("jLONGDireccion.text")); // NOI18N
        jLONGDireccion.setName("jLONGDireccion"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 15);
        jPanel33.add(jLONGDireccion, gridBagConstraints);

        jTFONGDireccion.setName("jTFONGDireccion"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jTFONGDireccion, gridBagConstraints);

        jLONGTelefono.setText(resourceMap.getString("jLONGTelefono.text")); // NOI18N
        jLONGTelefono.setName("jLONGTelefono"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 15);
        jPanel33.add(jLONGTelefono, gridBagConstraints);

        jTFONGTelefono.setName("jTFONGTelefono"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jTFONGTelefono, gridBagConstraints);

        jLONGEmail.setText(resourceMap.getString("jLONGEmail.text")); // NOI18N
        jLONGEmail.setName("jLONGEmail"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 15);
        jPanel33.add(jLONGEmail, gridBagConstraints);

        jTFONGEmail.setName("jTFONGEmail"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jTFONGEmail, gridBagConstraints);

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 15);
        jPanel33.add(jLabel10, gridBagConstraints);

        jScrollPane13.setName("jScrollPane13"); // NOI18N

        jTAONGDescripcion.setColumns(20);
        jTAONGDescripcion.setRows(5);
        jTAONGDescripcion.setName("jTAONGDescripcion"); // NOI18N
        jScrollPane13.setViewportView(jTAONGDescripcion);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.ipadx = 40;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jScrollPane13, gridBagConstraints);

        jBONGLimpiar.setName("jBONGLimpiar"); // NOI18N
        jBONGLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBONGLimpiarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 40, 15, 0);
        jPanel33.add(jBONGLimpiar, gridBagConstraints);

        jBONGGuardar.setName("jBONGGuardar"); // NOI18N
        jBONGGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBONGGuardarActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jBONGGuardar, gridBagConstraints);

        jLONGLogo.setText(resourceMap.getString("jLONGLogo.text")); // NOI18N
        jLONGLogo.setName("jLONGLogo"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 15);
        jPanel33.add(jLONGLogo, gridBagConstraints);

        jTFONGLogo.setName("jTFONGLogo"); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 15, 0);
        jPanel33.add(jTFONGLogo, gridBagConstraints);

        jPONG.add(jPanel33, java.awt.BorderLayout.CENTER);

        jPanel35.setName("jPanel35"); // NOI18N

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 684, Short.MAX_VALUE)
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPONG.add(jPanel35, java.awt.BorderLayout.PAGE_START);

        jPanel36.setName("jPanel36"); // NOI18N

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 684, Short.MAX_VALUE)
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPONG.add(jPanel36, java.awt.BorderLayout.PAGE_END);

        jPanel37.setName("jPanel37"); // NOI18N
        jPanel37.setPreferredSize(new java.awt.Dimension(20, 100));

        javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
        jPanel37.setLayout(jPanel37Layout);
        jPanel37Layout.setHorizontalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );
        jPanel37Layout.setVerticalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPONG.add(jPanel37, java.awt.BorderLayout.LINE_END);

        jPanel38.setName("jPanel38"); // NOI18N
        jPanel38.setPreferredSize(new java.awt.Dimension(400, 100));
        jPanel38.setLayout(new java.awt.BorderLayout());

        jLONGImagen.setText(resourceMap.getString("jLONGImagen.text")); // NOI18N
        jLONGImagen.setName("jLONGImagen"); // NOI18N
        jLONGImagen.setPreferredSize(new java.awt.Dimension(40, 0));
        jPanel38.add(jLONGImagen, java.awt.BorderLayout.CENTER);

        jPONG.add(jPanel38, java.awt.BorderLayout.LINE_START);

        jPBienvenida.setName("jPBienvenida"); // NOI18N
        jPBienvenida.setLayout(new java.awt.BorderLayout());

        jPDatosONG.setMinimumSize(new java.awt.Dimension(300, 100));
        jPDatosONG.setName("jPDatosONG"); // NOI18N

        jLBNombre.setText(resourceMap.getString("jLBNombre.text")); // NOI18N
        jLBNombre.setName("jLBNombre"); // NOI18N

        jLBDireccion.setText(resourceMap.getString("jLBDireccion.text")); // NOI18N
        jLBDireccion.setName("jLBDireccion"); // NOI18N

        jLBTelefono.setText(resourceMap.getString("jLBTelefono.text")); // NOI18N
        jLBTelefono.setName("jLBTelefono"); // NOI18N

        jLBEmail.setText(resourceMap.getString("jLBEmail.text")); // NOI18N
        jLBEmail.setName("jLBEmail"); // NOI18N

        jTFBDescripcion.setEditable(false);
        jTFBDescripcion.setName("jTFBDescripcion"); // NOI18N

        jLBLogo.setText(resourceMap.getString("jLBLogo.text")); // NOI18N
        jLBLogo.setName("jLBLogo"); // NOI18N

        jLBDescripcion.setText(resourceMap.getString("jLBDescripcion.text")); // NOI18N
        jLBDescripcion.setName("jLBDescripcion"); // NOI18N

        jTFBNombre.setEditable(false);
        jTFBNombre.setName("jTFBNombre"); // NOI18N

        jTFBDireccion.setEditable(false);
        jTFBDireccion.setName("jTFBDireccion"); // NOI18N

        jTFBTelefono.setEditable(false);
        jTFBTelefono.setName("jTFBTelefono"); // NOI18N

        jTFBEmail.setEditable(false);
        jTFBEmail.setName("jTFBEmail"); // NOI18N

        javax.swing.GroupLayout jPDatosONGLayout = new javax.swing.GroupLayout(jPDatosONG);
        jPDatosONG.setLayout(jPDatosONGLayout);
        jPDatosONGLayout.setHorizontalGroup(
            jPDatosONGLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPDatosONGLayout.createSequentialGroup()
                .addGroup(jPDatosONGLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPDatosONGLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jLBNombre))
                    .addGroup(jPDatosONGLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPDatosONGLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLBEmail)
                            .addComponent(jLBTelefono)
                            .addComponent(jLBDireccion)
                            .addComponent(jTFBDireccion)
                            .addComponent(jTFBNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 240, Short.MAX_VALUE)
                            .addComponent(jTFBTelefono)
                            .addComponent(jTFBEmail)
                            .addComponent(jLBDescripcion)
                            .addComponent(jLBLogo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jTFBDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(165, 165, 165)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPDatosONGLayout.setVerticalGroup(
            jPDatosONGLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPDatosONGLayout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addComponent(jLBNombre)
                .addGap(6, 6, 6)
                .addComponent(jTFBNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLBDireccion)
                .addGap(8, 8, 8)
                .addComponent(jTFBDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLBTelefono)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTFBTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLBEmail)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTFBEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25)
                .addComponent(jLBDescripcion)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTFBDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(48, 48, 48)
                .addComponent(jLBLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(262, 262, 262))
        );

        jPBienvenida.add(jPDatosONG, java.awt.BorderLayout.LINE_END);

        jPanel40.setName("jPanel40"); // NOI18N
        jPanel40.setPreferredSize(new java.awt.Dimension(400, 100));
        jPanel40.setLayout(new java.awt.BorderLayout());

        jLONGImagen1.setText(resourceMap.getString("jLONGImagen1.text")); // NOI18N
        jLONGImagen1.setName("jLONGImagen1"); // NOI18N
        jLONGImagen1.setPreferredSize(new java.awt.Dimension(40, 0));
        jPanel40.add(jLONGImagen1, java.awt.BorderLayout.CENTER);

        jPBienvenida.add(jPanel40, java.awt.BorderLayout.LINE_START);

        jPLogin.setName("jPLogin"); // NOI18N

        jIFLogin.setTitle(resourceMap.getString("jIFLogin.title")); // NOI18N
        jIFLogin.setName("jIFLogin"); // NOI18N
        jIFLogin.setVisible(true);
        jIFLogin.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jIFLoginKeyPressed(evt);
            }
        });

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jPFPassword.setName("jPFPassword"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jTFUsuario.setName("jTFUsuario"); // NOI18N

        jBAceptar.setText(resourceMap.getString("jBAceptar.text")); // NOI18N
        jBAceptar.setName("jBAceptar"); // NOI18N
        jBAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAceptarActionPerformed(evt);
            }
        });

        jBBorrar.setText(resourceMap.getString("jBBorrar.text")); // NOI18N
        jBBorrar.setName("jBBorrar"); // NOI18N
        jBBorrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBBorrarActionPerformed(evt);
            }
        });

        jLLogin.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLLogin.setText(resourceMap.getString("jLLogin.text")); // NOI18N
        jLLogin.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jLLogin.setName("jLLogin"); // NOI18N

        javax.swing.GroupLayout jIFLoginLayout = new javax.swing.GroupLayout(jIFLogin.getContentPane());
        jIFLogin.getContentPane().setLayout(jIFLoginLayout);
        jIFLoginLayout.setHorizontalGroup(
            jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jIFLoginLayout.createSequentialGroup()
                .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jIFLoginLayout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1)
                            .addComponent(jBAceptar, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(9, 9, 9)
                        .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jTFUsuario)
                                .addComponent(jPFPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE))
                            .addComponent(jBBorrar)))
                    .addGroup(jIFLoginLayout.createSequentialGroup()
                        .addGap(76, 76, 76)
                        .addComponent(jLLogin)))
                .addContainerGap(46, Short.MAX_VALUE))
        );
        jIFLoginLayout.setVerticalGroup(
            jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jIFLoginLayout.createSequentialGroup()
                .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jIFLoginLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLLogin)
                        .addGap(18, 18, 18)
                        .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(jTFUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(13, 13, 13)
                        .addGroup(jIFLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jPFPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jBBorrar))
                    .addGroup(jIFLoginLayout.createSequentialGroup()
                        .addGap(114, 114, 114)
                        .addComponent(jBAceptar)))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPLoginLayout = new javax.swing.GroupLayout(jPLogin);
        jPLogin.setLayout(jPLoginLayout);
        jPLoginLayout.setHorizontalGroup(
            jPLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1000, Short.MAX_VALUE)
            .addGroup(jPLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPLoginLayout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(jIFLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
        jPLoginLayout.setVerticalGroup(
            jPLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 513, Short.MAX_VALUE)
            .addGroup(jPLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPLoginLayout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(jIFLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );

        jPSocios.setMinimumSize(new java.awt.Dimension(800, 440));
        jPSocios.setName("jPSocios"); // NOI18N

        jTabbedSocio.setName("jTabbedSocio"); // NOI18N

        jPanelDatos.setName("jPanelDatos"); // NOI18N

        jSocPersona.setName("jSocPersona"); // NOI18N

        jLSocDNI.setText(resourceMap.getString("jLSocDNI.text")); // NOI18N
        jLSocDNI.setName("jLSocDNI"); // NOI18N

        jLSocNombre.setText(resourceMap.getString("jLSocNombre.text")); // NOI18N
        jLSocNombre.setName("jLSocNombre"); // NOI18N

        jLSocApellido1.setText(resourceMap.getString("jLSocApellido1.text")); // NOI18N
        jLSocApellido1.setName("jLSocApellido1"); // NOI18N

        jLSocApellido2.setText(resourceMap.getString("jLSocApellido2.text")); // NOI18N
        jLSocApellido2.setName("jLSocApellido2"); // NOI18N

        jLSocFechaNac.setText(resourceMap.getString("jLSocFechaNac.text")); // NOI18N
        jLSocFechaNac.setName("jLSocFechaNac"); // NOI18N

        jLSocTelefono.setText(resourceMap.getString("jLSocTelefono.text")); // NOI18N
        jLSocTelefono.setName("jLSocTelefono"); // NOI18N

        jLSocDireccion.setText(resourceMap.getString("jLSocDireccion.text")); // NOI18N
        jLSocDireccion.setName("jLSocDireccion"); // NOI18N

        jLSocEmail.setText(resourceMap.getString("jLSocEmail.text")); // NOI18N
        jLSocEmail.setName("jLSocEmail"); // NOI18N

        jTFSocDNI.setName("jTFSocDNI"); // NOI18N
        jTFSocDNI.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocDNIKeyTyped(evt);
            }
        });

        jTFSocNombre.setName("jTFSocNombre"); // NOI18N
        jTFSocNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocNombreKeyTyped(evt);
            }
        });

        jTFSocApellido1.setName("jTFSocApellido1"); // NOI18N
        jTFSocApellido1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocApellido1KeyTyped(evt);
            }
        });

        jTFSocApellido2.setName("jTFSocApellido2"); // NOI18N
        jTFSocApellido2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocApellido2KeyTyped(evt);
            }
        });

        jTFSocTelefono.setName("jTFSocTelefono"); // NOI18N
        jTFSocTelefono.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocTelefonoKeyTyped(evt);
            }
        });

        jTFSocDireccion.setName("jTFSocDireccion"); // NOI18N
        jTFSocDireccion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocDireccionKeyTyped(evt);
            }
        });

        jTFSocEmail.setName("jTFSocEmail"); // NOI18N
        jTFSocEmail.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocEmailKeyTyped(evt);
            }
        });

        jFTFSocFechaNac.setName("jFTFSocFechaNac"); // NOI18N
        jFTFSocFechaNac.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jFTFSocFechaNacKeyTyped(evt);
            }
        });

        javax.swing.GroupLayout jSocPersonaLayout = new javax.swing.GroupLayout(jSocPersona);
        jSocPersona.setLayout(jSocPersonaLayout);
        jSocPersonaLayout.setHorizontalGroup(
            jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jSocPersonaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLSocDNI)
                    .addComponent(jLSocNombre)
                    .addComponent(jLSocApellido2)
                    .addComponent(jLSocFechaNac)
                    .addComponent(jLSocTelefono)
                    .addComponent(jLSocDireccion)
                    .addComponent(jLSocEmail)
                    .addComponent(jLSocApellido1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTFSocEmail, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jTFSocDireccion, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jTFSocTelefono, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jTFSocApellido2, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jTFSocNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jTFSocDNI, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jTFSocApellido1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                    .addComponent(jFTFSocFechaNac, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE))
                .addContainerGap())
        );
        jSocPersonaLayout.setVerticalGroup(
            jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jSocPersonaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocDNI)
                    .addComponent(jTFSocDNI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocNombre)
                    .addComponent(jTFSocNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFSocApellido1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLSocApellido1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocApellido2)
                    .addComponent(jTFSocApellido2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocFechaNac)
                    .addComponent(jFTFSocFechaNac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocTelefono)
                    .addComponent(jTFSocTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocDireccion)
                    .addComponent(jTFSocDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jSocPersonaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLSocEmail)
                    .addComponent(jTFSocEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jSocCuota.setName("jSocCuota"); // NOI18N

        jLSocCuota.setText(resourceMap.getString("jLSocCuota.text")); // NOI18N
        jLSocCuota.setName("jLSocCuota"); // NOI18N

        jTFSocCuota.setName("jTFSocCuota"); // NOI18N
        jTFSocCuota.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocCuotaKeyTyped(evt);
            }
        });

        jLSocPeriodicidad.setText(resourceMap.getString("jLSocPeriodicidad.text")); // NOI18N
        jLSocPeriodicidad.setName("jLSocPeriodicidad"); // NOI18N

        jCBSocPeriodicidad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Semanal", "Quincenal", "Mensual", "Trimestral", "Anual" }));
        jCBSocPeriodicidad.setName("jCBSocPeriodicidad"); // NOI18N
        jCBSocPeriodicidad.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jCBSocPeriodicidadMouseClicked(evt);
            }
        });

        jLSocFormaPago.setText(resourceMap.getString("jLSocFormaPago.text")); // NOI18N
        jLSocFormaPago.setName("jLSocFormaPago"); // NOI18N

        jPanelBanco.setName("jPanelBanco"); // NOI18N

        jTFSocBanco.setColumns(4);
        jTFSocBanco.setToolTipText(resourceMap.getString("jTFSocBanco.toolTipText")); // NOI18N
        jTFSocBanco.setName("jTFSocBanco"); // NOI18N
        jTFSocBanco.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTFSocBancoKeyPressed(evt);
            }
        });

        jTFSocOficina.setToolTipText(resourceMap.getString("jTFSocOficina.toolTipText")); // NOI18N
        jTFSocOficina.setName("jTFSocOficina"); // NOI18N
        jTFSocOficina.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTFSocOficinaKeyPressed(evt);
            }
        });

        jLSocOficina.setText(resourceMap.getString("jLSocOficina.text")); // NOI18N
        jLSocOficina.setName("jLSocOficina"); // NOI18N

        jLSocDC.setText(resourceMap.getString("jLSocDC.text")); // NOI18N
        jLSocDC.setName("jLSocDC"); // NOI18N

        jTFSocCuenta.setToolTipText(resourceMap.getString("jTFSocCuenta.toolTipText")); // NOI18N
        jTFSocCuenta.setName("jTFSocCuenta"); // NOI18N
        jTFSocCuenta.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTFSocCuentaKeyPressed(evt);
            }
        });

        jTFSocDC.setToolTipText(resourceMap.getString("jTFSocDC.toolTipText")); // NOI18N
        jTFSocDC.setName("jTFSocDC"); // NOI18N
        jTFSocDC.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTFSocDCKeyPressed(evt);
            }
        });

        jLSocCuenta.setText(resourceMap.getString("jLSocCuenta.text")); // NOI18N
        jLSocCuenta.setName("jLSocCuenta"); // NOI18N

        jLSocBanco.setText(resourceMap.getString("jLSocBanco.text")); // NOI18N
        jLSocBanco.setName("jLSocBanco"); // NOI18N

        jRBSocPagoTransferencia.setText(resourceMap.getString("jRBSocPagoTransferencia.text")); // NOI18N
        jRBSocPagoTransferencia.setName("jRBSocPagoTransferencia"); // NOI18N
        jRBSocPagoTransferencia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRBSocPagoTransferenciaActionPerformed(evt);
            }
        });

        jRBSocPagoEfectivo.setText(resourceMap.getString("jRBSocPagoEfectivo.text")); // NOI18N
        jRBSocPagoEfectivo.setName("jRBSocPagoEfectivo"); // NOI18N
        jRBSocPagoEfectivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRBSocPagoEfectivoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelBancoLayout = new javax.swing.GroupLayout(jPanelBanco);
        jPanelBanco.setLayout(jPanelBancoLayout);
        jPanelBancoLayout.setHorizontalGroup(
            jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBancoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRBSocPagoTransferencia)
                    .addComponent(jRBSocPagoEfectivo))
                .addGap(18, 18, 18)
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLSocBanco)
                    .addComponent(jTFSocBanco, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTFSocOficina)
                    .addComponent(jLSocOficina, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTFSocDC, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLSocDC))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTFSocCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLSocCuenta))
                .addGap(99, 99, 99))
        );
        jPanelBancoLayout.setVerticalGroup(
            jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBancoLayout.createSequentialGroup()
                .addContainerGap(11, Short.MAX_VALUE)
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRBSocPagoTransferencia)
                    .addComponent(jTFSocOficina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTFSocDC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTFSocCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTFSocBanco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRBSocPagoEfectivo)
                    .addGroup(jPanelBancoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLSocBanco)
                        .addComponent(jLSocOficina)
                        .addComponent(jLSocDC)
                        .addComponent(jLSocCuenta)))
                .addContainerGap())
        );

        jPanelControl.setName("jPanelControl"); // NOI18N

        jButtonNuevo.setIcon(resourceMap.getIcon("jButtonNuevo.icon")); // NOI18N
        jButtonNuevo.setToolTipText(resourceMap.getString("jButtonNuevo.toolTipText")); // NOI18N
        jButtonNuevo.setName("jButtonNuevo"); // NOI18N
        jButtonNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNuevoActionPerformed(evt);
            }
        });

        jButtonBuscar.setIcon(resourceMap.getIcon("jButtonBuscar.icon")); // NOI18N
        jButtonBuscar.setName("jButtonBuscar"); // NOI18N
        jButtonBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBuscarActionPerformed(evt);
            }
        });

        jButtonGuardar.setIcon(resourceMap.getIcon("jButtonGuardar.icon")); // NOI18N
        jButtonGuardar.setName("jButtonGuardar"); // NOI18N
        jButtonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonGuardarActionPerformed(evt);
            }
        });

        jButtonBaja.setIcon(resourceMap.getIcon("jButtonBaja.icon")); // NOI18N
        jButtonBaja.setName("jButtonBaja"); // NOI18N
        jButtonBaja.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBajaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelControlLayout = new javax.swing.GroupLayout(jPanelControl);
        jPanelControl.setLayout(jPanelControlLayout);
        jPanelControlLayout.setHorizontalGroup(
            jPanelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelControlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButtonNuevo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonBuscar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonGuardar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonBaja)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelControlLayout.setVerticalGroup(
            jPanelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelControlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonBaja)
                    .addComponent(jButtonNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBuscar)
                    .addComponent(jButtonGuardar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jSocCuotaLayout = new javax.swing.GroupLayout(jSocCuota);
        jSocCuota.setLayout(jSocCuotaLayout);
        jSocCuotaLayout.setHorizontalGroup(
            jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jSocCuotaLayout.createSequentialGroup()
                .addGroup(jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jSocCuotaLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLSocFormaPago))
                    .addGroup(jSocCuotaLayout.createSequentialGroup()
                        .addGroup(jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jSocCuotaLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jLSocPeriodicidad))
                            .addGroup(jSocCuotaLayout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLSocCuota)))
                        .addGap(14, 14, 14)
                        .addGroup(jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jTFSocCuota, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
                            .addComponent(jCBSocPeriodicidad, javax.swing.GroupLayout.Alignment.LEADING, 0, 277, Short.MAX_VALUE)))
                    .addGroup(jSocCuotaLayout.createSequentialGroup()
                        .addGap(68, 68, 68)
                        .addComponent(jPanelBanco, javax.swing.GroupLayout.PREFERRED_SIZE, 307, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jSocCuotaLayout.createSequentialGroup()
                .addContainerGap(127, Short.MAX_VALUE)
                .addComponent(jPanelControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jSocCuotaLayout.setVerticalGroup(
            jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jSocCuotaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocCuota)
                    .addComponent(jTFSocCuota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(13, 13, 13)
                .addGroup(jSocCuotaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocPeriodicidad)
                    .addComponent(jCBSocPeriodicidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(13, 13, 13)
                .addComponent(jLSocFormaPago)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelBanco, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelDatosLayout = new javax.swing.GroupLayout(jPanelDatos);
        jPanelDatos.setLayout(jPanelDatosLayout);
        jPanelDatosLayout.setHorizontalGroup(
            jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSocPersona, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jSocCuota, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanelDatosLayout.setVerticalGroup(
            jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSocCuota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSocPersona, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jTabbedSocio.addTab(resourceMap.getString("jPanelDatos.TabConstraints.tabTitle"), jPanelDatos); // NOI18N

        jPanelPago.setName("jPanelPago"); // NOI18N

        jSocPago.setName("jSocPago"); // NOI18N

        jLSocCantidad.setText(resourceMap.getString("jLSocCantidad.text")); // NOI18N
        jLSocCantidad.setName("jLSocCantidad"); // NOI18N

        jTFSocCantidad.setName("jTFSocCantidad"); // NOI18N
        jTFSocCantidad.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTFSocCantidadKeyTyped(evt);
            }
        });

        jLSocFechaPago.setText(resourceMap.getString("jLSocFechaPago.text")); // NOI18N
        jLSocFechaPago.setName("jLSocFechaPago"); // NOI18N

        jFTFSocFechaPago.setName("jFTFSocFechaPago"); // NOI18N
        jFTFSocFechaPago.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jFTFSocFechaPagoKeyTyped(evt);
            }
        });

        jButtonPagar.setText(resourceMap.getString("jButtonPagar.text")); // NOI18N
        jButtonPagar.setName("jButtonPagar"); // NOI18N
        jButtonPagar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPagarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jSocPagoLayout = new javax.swing.GroupLayout(jSocPago);
        jSocPago.setLayout(jSocPagoLayout);
        jSocPagoLayout.setHorizontalGroup(
            jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jSocPagoLayout.createSequentialGroup()
                .addGroup(jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jSocPagoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLSocFechaPago)
                            .addComponent(jLSocCantidad))
                        .addGap(18, 18, 18)
                        .addGroup(jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jTFSocCantidad)
                            .addComponent(jFTFSocFechaPago, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE)))
                    .addGroup(jSocPagoLayout.createSequentialGroup()
                        .addGap(70, 70, 70)
                        .addComponent(jButtonPagar)))
                .addContainerGap())
        );
        jSocPagoLayout.setVerticalGroup(
            jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jSocPagoLayout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocCantidad)
                    .addComponent(jTFSocCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jSocPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLSocFechaPago)
                    .addComponent(jFTFSocFechaPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jButtonPagar)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jSocContenedorPagos.setName("jSocContenedorPagos"); // NOI18N

        jTSocPagos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Cantidad", "Fecha Pago"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTSocPagos.setName("jTSocPagos"); // NOI18N
        jTSocPagos.getTableHeader().setReorderingAllowed(false);
        jSocContenedorPagos.setViewportView(jTSocPagos);
        jTSocPagos.getColumnModel().getColumn(0).setResizable(false);
        jTSocPagos.getColumnModel().getColumn(1).setResizable(false);

        javax.swing.GroupLayout jPanelPagoLayout = new javax.swing.GroupLayout(jPanelPago);
        jPanelPago.setLayout(jPanelPagoLayout);
        jPanelPagoLayout.setHorizontalGroup(
            jPanelPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelPagoLayout.createSequentialGroup()
                .addGap(83, 83, 83)
                .addComponent(jSocPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
                .addComponent(jSocContenedorPagos, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(108, 108, 108))
        );
        jPanelPagoLayout.setVerticalGroup(
            jPanelPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelPagoLayout.createSequentialGroup()
                .addGap(44, 44, 44)
                .addGroup(jPanelPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSocPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSocContenedorPagos, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(50, Short.MAX_VALUE))
        );

        jTabbedSocio.addTab(resourceMap.getString("jPanelPago.TabConstraints.tabTitle"), jPanelPago); // NOI18N

        jScrollPaneSocios.setName("jScrollPaneSocios"); // NOI18N

        jTSocSocios.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "E", "NOMBRE", "1er. APELLIDO", "2do. APELLIDO", "CUOTA", "PERIODICIDAD"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTSocSocios.setEditingRow(0);
        jTSocSocios.setMinimumSize(new java.awt.Dimension(90, 90));
        jTSocSocios.setName("jTSocSocios"); // NOI18N
        jTSocSocios.getTableHeader().setReorderingAllowed(false);
        jTSocSocios.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTSocSociosMouseClicked(evt);
            }
        });
        jScrollPaneSocios.setViewportView(jTSocSocios);

        jCheckBoxMostrar.setText(resourceMap.getString("jCheckBoxMostrar.text")); // NOI18N
        jCheckBoxMostrar.setName("jCheckBoxMostrar"); // NOI18N
        jCheckBoxMostrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxMostrarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPSociosLayout = new javax.swing.GroupLayout(jPSocios);
        jPSocios.setLayout(jPSociosLayout);
        jPSociosLayout.setHorizontalGroup(
            jPSociosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPSociosLayout.createSequentialGroup()
                .addContainerGap(705, Short.MAX_VALUE)
                .addComponent(jCheckBoxMostrar)
                .addContainerGap())
            .addComponent(jScrollPaneSocios, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 804, Short.MAX_VALUE)
            .addGroup(jPSociosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedSocio, javax.swing.GroupLayout.DEFAULT_SIZE, 784, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPSociosLayout.setVerticalGroup(
            jPSociosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPSociosLayout.createSequentialGroup()
                .addComponent(jScrollPaneSocios, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jCheckBoxMostrar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jTabbedSocio, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(45, 45, 45))
        );

        jPDonativos.setName("jPDonativos"); // NOI18N

        jPFormulario.setName("jPFormulario"); // NOI18N

        jTFApellido1.setName("jTFApellido1"); // NOI18N

        jLDNI.setText(resourceMap.getString("jLDNI.text")); // NOI18N
        jLDNI.setName("jLDNI"); // NOI18N

        jLNombre.setText(resourceMap.getString("jLNombre.text")); // NOI18N
        jLNombre.setName("jLNombre"); // NOI18N

        jLApellido1.setText(resourceMap.getString("jLApellido1.text")); // NOI18N
        jLApellido1.setName("jLApellido1"); // NOI18N

        jLApellido2.setText(resourceMap.getString("jLApellido2.text")); // NOI18N
        jLApellido2.setName("jLApellido2"); // NOI18N

        jTFDNI.setName("jTFDNI"); // NOI18N

        jTFNombre.setName("jTFNombre"); // NOI18N

        jTFApellido2.setName("jTFApellido2"); // NOI18N

        jPDatosPago.setName("jPDatosPago"); // NOI18N

        jLCantidad.setText(resourceMap.getString("jLCantidad.text")); // NOI18N
        jLCantidad.setName("jLCantidad"); // NOI18N

        jLFechaPago.setText(resourceMap.getString("jLFechaPago.text")); // NOI18N
        jLFechaPago.setName("jLFechaPago"); // NOI18N

        jTFCantidad.setName("jTFCantidad"); // NOI18N

        jTFFechaPago.setName("jTFFechaPago"); // NOI18N

        jBPagar.setText(resourceMap.getString("jBPagar.text")); // NOI18N
        jBPagar.setName("jBPagar"); // NOI18N
        jBPagar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBPagarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPDatosPagoLayout = new javax.swing.GroupLayout(jPDatosPago);
        jPDatosPago.setLayout(jPDatosPagoLayout);
        jPDatosPagoLayout.setHorizontalGroup(
            jPDatosPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPDatosPagoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPDatosPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPDatosPagoLayout.createSequentialGroup()
                        .addComponent(jLCantidad)
                        .addGap(31, 31, 31)
                        .addComponent(jTFCantidad, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE))
                    .addGroup(jPDatosPagoLayout.createSequentialGroup()
                        .addComponent(jLFechaPago)
                        .addGap(18, 18, 18)
                        .addComponent(jTFFechaPago, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPDatosPagoLayout.createSequentialGroup()
                .addContainerGap(98, Short.MAX_VALUE)
                .addComponent(jBPagar)
                .addGap(104, 104, 104))
        );
        jPDatosPagoLayout.setVerticalGroup(
            jPDatosPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPDatosPagoLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addGroup(jPDatosPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLCantidad))
                .addGap(18, 18, 18)
                .addGroup(jPDatosPagoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLFechaPago)
                    .addComponent(jTFFechaPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jBPagar)
                .addContainerGap(14, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPFormularioLayout = new javax.swing.GroupLayout(jPFormulario);
        jPFormulario.setLayout(jPFormularioLayout);
        jPFormularioLayout.setHorizontalGroup(
            jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPFormularioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLDNI)
                    .addComponent(jLApellido1)
                    .addComponent(jLApellido2)
                    .addComponent(jLNombre))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTFApellido2)
                    .addComponent(jTFApellido1)
                    .addComponent(jTFDNI)
                    .addComponent(jTFNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(jPDatosPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(68, Short.MAX_VALUE))
        );
        jPFormularioLayout.setVerticalGroup(
            jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPFormularioLayout.createSequentialGroup()
                .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPFormularioLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLDNI)
                            .addComponent(jTFDNI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLNombre)
                            .addComponent(jTFNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLApellido1)
                            .addComponent(jTFApellido1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPFormularioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLApellido2)
                            .addComponent(jTFApellido2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPDatosPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        jScrollPaneDonativos.setName("jScrollPaneDonativos"); // NOI18N

        jTDonativos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Nombre y Apellidos", "Cantidad", "Fecha Pago"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTDonativos.setName("jTDonativos"); // NOI18N
        jTDonativos.getTableHeader().setReorderingAllowed(false);
        jScrollPaneDonativos.setViewportView(jTDonativos);

        jCBMostrarAnonimos.setText(resourceMap.getString("jCBMostrarAnonimos.text")); // NOI18N
        jCBMostrarAnonimos.setName("jCBMostrarAnonimos"); // NOI18N
        jCBMostrarAnonimos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBMostrarAnonimosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPDonativosLayout = new javax.swing.GroupLayout(jPDonativos);
        jPDonativos.setLayout(jPDonativosLayout);
        jPDonativosLayout.setHorizontalGroup(
            jPDonativosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPDonativosLayout.createSequentialGroup()
                .addGroup(jPDonativosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPDonativosLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jCBMostrarAnonimos))
                    .addGroup(jPDonativosLayout.createSequentialGroup()
                        .addGap(37, 37, 37)
                        .addGroup(jPDonativosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPaneDonativos, javax.swing.GroupLayout.DEFAULT_SIZE, 696, Short.MAX_VALUE)
                            .addComponent(jPFormulario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(43, 43, 43))
        );
        jPDonativosLayout.setVerticalGroup(
            jPDonativosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPDonativosLayout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addComponent(jPFormulario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPaneDonativos, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jCBMostrarAnonimos)
                .addGap(20, 20, 20))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents

    private void jBAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAceptarActionPerformed
    
        ResultSet res_a;
        try {
            res_a = (ResultSet) bd.comprobar_acceso(jTFUsuario.getText(), jPFPassword.getText());
            if(res_a.next()){
                perfil=(String) res_a.getObject("Perfil_aplicacion");
                perfiles p = perfiles.valueOf(perfil);
                switch (p) {
                    case Responsable_proyectos:
                        jTBPersonal.setEnabled(false);
                        jTBPersonal.setEnabled(false);
                        jTBEventos.setEnabled(false);
                        jTBSocios.setEnabled(false);
                        jTBDonaciones.setEnabled(false);
                        jTBONG.setEnabled(false);
                    break;
                    case Responsable_personal:
                        jTBProyectos.setEnabled(false);
                        jTBEventos.setEnabled(false);
                        jTBONG.setEnabled(false);
                    break;
                    case Responsable_eventos:
                        jTBProyectos.setEnabled(false);
                        jTBPersonal.setEnabled(false);
                        jTBSocios.setEnabled(false);
                        jTBDonaciones.setEnabled(false);
                        jTBONG.setEnabled(false);
                    break;
                    case No_autorizado:
                        jTBProyectos.setEnabled(false);
                        jTBPersonal.setEnabled(false);
                        jTBEventos.setEnabled(false);
                        jTBSocios.setEnabled(false);
                        jTBDonaciones.setEnabled(false);
                        jTBONG.setEnabled(false);
                    break;
                        
                }
         
                jPToolbar.setVisible(true);
                jIFLogin.dispose();
                jPMain.add(jPBienvenida, java.awt.BorderLayout.CENTER);
                jPBienvenida.setVisible(true);
           }
            else {
                jPToolbar.setVisible(false);
                jLLogin.setForeground(Color.RED);
                jLLogin.setText("Login incorrecto, inténtelo de nuevo");
            }
            res_a.close();
                
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBAceptarActionPerformed

    private void jBBorrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBBorrarActionPerformed
        jTFUsuario.setText("");
        jPFPassword.setText("");
    }//GEN-LAST:event_jBBorrarActionPerformed

    private void jTBProyectosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBProyectosActionPerformed
        JPanelSetVisible (jPProyectos);
    }//GEN-LAST:event_jTBProyectosActionPerformed

    private void jTBPersonalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBPersonalActionPerformed
        JPanelSetVisible (jPPersonal);   
    }//GEN-LAST:event_jTBPersonalActionPerformed

    private void jTBEventosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBEventosActionPerformed
        JPanelSetVisible (jPEventos);
    }//GEN-LAST:event_jTBEventosActionPerformed

    private void jTBSociosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBSociosActionPerformed
        JPanelSetVisible (jPSocios);
        limpiarFormularioSocios();
        jTSocSocios.clearSelection(); //Deseleccionamos las filas y columnas de la tabla
        
        // Para que muestre los activos
        jCheckBoxMostrar.setSelected(false);
        jPSocMostrar();
        jTabbedSocio.setSelectedIndex(0); // Seleccionar la pestaña datos
    }//GEN-LAST:event_jTBSociosActionPerformed

    private void jTFPersDniKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersDniKeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersDniKeyTyped

    private void jTFPersNombreKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersNombreKeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersNombreKeyTyped

    private void jTFPersApellido1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersApellido1KeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersApellido1KeyTyped

    private void jTFPersApellido2KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersApellido2KeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersApellido2KeyTyped

    private void jTFPersTelefonoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersTelefonoKeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersTelefonoKeyTyped

    private void jTFPersEmailKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersEmailKeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersEmailKeyTyped

    private void jBPersBajaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBPersBajaActionPerformed
        if(fbaja==null){//damos de baja
            consulta=JOptionPane.showOptionDialog(jPPersC, "¿Esta seguro que desea dar de baja a "+nombre+" "+ape1+" "+ape2+" ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if(consulta==JOptionPane.OK_OPTION){
                try {
                    bd.procedureBajaPersonal(dni);
                    procResult = bd.getResultProcedure();
                    if(procResult==1){
                        res=(ResultSet) bd.mostrar_personal(estado);
                        jPPersonalMostrarBusqueda(res);
                     } else if(procResult==-2){
                        JOptionPane.showMessageDialog(jPPersC, "Esta persona es Responsable de un evento o Director de un proyecto.\n No se puede dar de baja.", "AVISO", JOptionPane.WARNING_MESSAGE);
                     }
                  }catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                  }
               }
        }else if(fbaja!=null){
            consulta=JOptionPane.showOptionDialog(jPPersC, "¿Esta seguro que desea dar de Alta a "+nombre+" "+ape1+" "+ape2+" ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if(consulta==JOptionPane.OK_OPTION){
                try {
                    bd.renovar_alta(dni);
                    res = (ResultSet) bd.mostrar_personal(estado);
                    jPPersonalMostrarBusqueda(res);
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
      }
}//GEN-LAST:event_jBPersBajaActionPerformed

    private void jCBMostarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBMostarActionPerformed
        try {
            if (estado == 0) {
                try {
                    estado = 1;
                    res = (ResultSet) bd.mostrar_personal(estado);
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                try {
                    estado = 0;
                    res = (ResultSet) bd.mostrar_personal(estado);
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            jPPersonalMostrarBusqueda(res);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }       
}//GEN-LAST:event_jCBMostarActionPerformed

    private void jBPersNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBPersNuevoActionPerformed
        try {
            limpiar_formulario();
            res = (ResultSet) bd.mostrar_personal(estado);
            jPPersonalMostrarBusqueda(res);
            jPPersonalInactivarBotones();
        } catch (Exception ex) {//GEN-LAST:event_jBPersNuevoActionPerformed
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }                                           

    @SuppressWarnings("empty-statement")
    private void jBPersBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBPersBuscarActionPerformed
        dni=jTFPersDni.getText();
        jPPersObtenerDatosFormulario();
        if(!dni.equals("") || !nombre.equals("") || !ape1.equals("") || !ape2.equals("") || !tlf.equals("")
                || !email.equals("") || !dir.equals("")|| !jFTFPersFechaNacimiento.getText().isEmpty()){
            try {
                String con = "SELECT * FROM personal WHERE ";
                if (!dni.equals(""))
                    con += "DNI='" + dni + "'";
                if (!nombre.equals("")) {
                    if (dni.equals(""))
                        con += " Nombre='" + nombre + "'";
                    else
                        con += " AND Nombre='" + nombre + "'";
                }
                if (!ape1.equals("")) {
                    if (dni.equals("") && nombre.equals(""))
                        con += " Apellido1='" + ape1 + "'";
                    else
                        con += " AND Apellido1='" + ape1 + "'";
                }
                if (!ape2.equals("")) {
                    if (dni.equals("") && nombre.equals("") && ape1.equals(""))
                        con += " Apellido2='" + ape2 + "'";
                    else
                        con += " AND Apellido2='" + ape2 + "'";
                }
                if (!tlf.equals("")) {
                    if (dni.equals("") && nombre.equals("") && ape1.equals("") && ape2.equals(" "))
                        con += " Telefono='" + tlf + "'";
                    else
                        con += " AND Telefono='" + tlf + "'";
                }
                if (!email.equals("")) {
                    if (dni.equals("") && nombre.equals("") && ape1.equals("") && ape2.equals(" ") && tlf.equals(""))
                        con += " Email='" + email + "'";
                    else 
                        con += " AND Email='" + email + "'";
                }
                if (!dir.equals("")) {
                    if (dni.equals("") && nombre.equals("") && ape1.equals("") && ape2.equals(" ") && tlf.equals("") && dir.equals(""))
                        con += " direccion='" + dir + "'";
                    else
                        con += " AND direccion='" + dir + "'";
                }
                if (!jFTFPersFechaNacimiento.getText().isEmpty()) {
                    if (dni.equals("") && nombre.equals("") && ape1.equals("") && ape2.equals("") && tlf.equals("") && dir.equals("") && dir.equals(""))
                        con += " Fecha_nacimiento='" + fnacimiento + "'";
                    else 
                        con += " AND Fecha_nacimiento='" + fnacimiento + "'";
                }
                con += ";";
                res = bd.buscarPersonal(con);
                jPPersonalMostrarBusqueda(res);
                if(npersonas==0){
                    JOptionPane.showMessageDialog(jPPersC, "No existen coincidencias en la busqueda", "AVISO", JOptionPane.WARNING_MESSAGE);
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }else{
            JOptionPane.showMessageDialog(jPPersC, "Debe rellenar algún campo para iniciar la búsqueda", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_jBPersBuscarActionPerformed

public void personalAcceso(){
        if(!login_p.isEmpty() && !pass_p.isEmpty()){
            consulta=JOptionPane.showOptionDialog(jPPersC, "Confirma estos datos para el acceso:\n\t- Login: "+login_p+"\n\t- Password: ******"+"\n\t- Perfil: "+perfil_p , "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if(consulta==JOptionPane.OK_OPTION){
                try {
                    bd.procedureGuardarAcceso(login_p, pass_p, dni, perfil_p);
                } catch (SQLException ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
}    
    
    private void jBPersGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBPersGuardarActionPerformed
        
        int validarDNI,validarF=0;
        dni = jTFPersDni.getText();
        jPPersObtenerDatosFormulario();
        
        if(jTPersonal.getSelectedRow() == -1){       //no hay fila seleccionada,insertamos datos
            if (!dni.isEmpty() && !nombre.isEmpty() && !ape1.isEmpty() && !ape2.isEmpty()){
                if(!jFTFPersFechaNacimiento.getText().isEmpty()){
                    validarF=validarFecha(jFTFPersFechaNacimiento.getText());
                    fnacimiento= Date.valueOf(jFTFPersFechaNacimiento.getText());
                    if(validarF==0)
                        JOptionPane.showMessageDialog(jTPTareas, "La fecha introducida no es valida", "ERROR", JOptionPane.ERROR_MESSAGE);
                }
                try {
                validarDNI=validarDNI(dni);
                if(validarDNI==0)
                    JOptionPane.showMessageDialog(jTPTareas, "El DNI introducido no es valido", "ERROR", JOptionPane.ERROR_MESSAGE);
                else{
                    if(fnacimiento!=null)
                        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t- DNI: "+dni+"\n\t- Nombre: "+nombre+"\n\t- 1er.Apellido: "+ape1+"\n\t- 2do.Apellido: "+ape2+"\n\t- Telefono: "+tlf+"\n\t- Email: "+email+"\n\t- Direccion: "+dir+"\n\t- Fecha Nacimiento: "+fnacimiento , "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    else
                        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t- DNI: "+dni+"\n\t- Nombre: "+nombre+"\n\t- 1er.Apellido: "+ape1+"\n\t- 2do.Apellido: "+ape2+"\n\t- Telefono: "+tlf+"\n\t- Email: "+email+"\n\t- Direccion: "+dir+"\n\t- Fecha Nacimiento: ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if(consulta==JOptionPane.OK_OPTION){
                        bd.procedureAltaPersonal(dni, nombre, ape1, ape2, tlf, email,dir,fnacimiento);
                        procResult = bd.getResultProcedure();
                        if (procResult == 0) 
                            JOptionPane.showMessageDialog(jPPersC, "El DNI "+dni+" ya existe en el sistema", "AVISO", JOptionPane.WARNING_MESSAGE);
                        else if (procResult == -1) {
                            //System.out.println("FALLO EN ALTA PERSONAL");
                        }else {
                            personalAcceso();
                            res=(ResultSet) bd.mostrar_personal(estado);
                            jPPersonalMostrarBusqueda(res);
                        }
                    }
                }
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            else
                JOptionPane.showMessageDialog(jPPersC, "Debe rellenar los campos: DNI, Nombre, 1er.Apellido y 2do.Apellido", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
        else{           //estamos editando
            try {
                obtener_datos();    //obtenemos los datos de la tabla
                res = (ResultSet) bd.obtener_datosFila(dni); 
                obtener_DniFaltaFbaja(res); //obtener Dni,F.Alta, F.baja
                dni_nuevo=jTFPersDni.getText();
                jPPersObtenerDatosFormulario();
                validarDNI=validarDNI(dni_nuevo);
                if(validarDNI==0)
                    JOptionPane.showMessageDialog(jTPTareas, "El DNI introducido no es valido", "ERROR", JOptionPane.ERROR_MESSAGE);
                else{
                if(fnacimiento!=null)
                        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t- DNI: "+dni+"\n\t- Nombre: "+nombre+"\n\t- 1er.Apellido: "+ape1+"\n\t- 2do.Apellido: "+ape2+"\n\t- Telefono: "+tlf+"\n\t- Email: "+email+"\n\t- Direccion: "+dir+"\n\t- Fecha Nacimiento: "+fnacimiento , "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                else
                        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t- DNI: "+dni+"\n\t- Nombre: "+nombre+"\n\t- 1er.Apellido: "+ape1+"\n\t- 2do.Apellido: "+ape2+"\n\t- Telefono: "+tlf+"\n\t- Email: "+email+"\n\t- Direccion: "+dir+"\n\t- Fecha Nacimiento: ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if(consulta==JOptionPane.OK_OPTION){
                    bd.procedureEditarPersonal(dni, dni_nuevo, nombre, ape1, ape2, tlf, email,dir,fnacimiento);
                    procResult = bd.getResultProcedure();
                    if(procResult==0){
                        JOptionPane.showMessageDialog(jTPTareas, "DNI ya  introducido", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }else{
                        personalAcceso();
                        res=(ResultSet) bd.mostrar_personal(estado);
                        jPPersonalMostrarBusqueda(res);
                    }
                
                }
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        

        jTPersonal.clearSelection();
    }//GEN-LAST:event_jBPersGuardarActionPerformed

    private void jTPersonalMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTPersonalMouseClicked
        limpiar_formulario();
        try {
            sel = jTPersonal.getSelectedRow();
            obtener_datos();
            res = (ResultSet) bd.obtener_datosFila(dni);
            obtener_DniFaltaFbaja(res); //obtener Dni,F.Alta, F.baja
            
            res = (ResultSet) bd.obtenerDatosAcceso(dni);
            obtenerDatosAcceso(res);
          
            //activamos botoness
            jBPersBaja.setEnabled(true);
            jBPersNuevo.setEnabled(true);
            jBPersBuscar.setEnabled(true);

            jTFPersDni.setText(dni);
            jTFPersNombre.setText(nombre);
            jTFPersApellido1.setText(ape1);
            jTFPersApellido2.setText(ape2);
            jTFPersEmail.setText(email);
            jTFPersTelefono.setText(tlf);
            jTFPersFechaAlta.setText(falta.toString());
            jTFPersDireccion.setText(dir);
            
            if(naccesos==1){    
                jTFPersLogin.setText(login_p);
                jPFPersPassword.setText(pass_p);
                jCBPersPerfil.setSelectedItem(perfil_p);
            }
            if(fnacimiento!=null)
                jFTFPersFechaNacimiento.setText(fnacimiento.toString());
            
            if (fbaja != null) {
                jTFPersFechaBaja.setText(fbaja.toString());
                jBPersBaja.setIcon(icon_añadir);
            }
            if (fbaja == null) {
                jBPersBaja.setIcon(icon_cancelar);
            }
            //Comprobamos si el panel viene de taras, voluntario o eventos para activar el boton
            if (panel != 0) {
                jBPersAceptar.setEnabled(true);
            }
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jTPersonalMouseClicked

    private void jBEvenNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEvenNuevoActionPerformed
     jPEvenLimpiarFormulario();
        try {
            res_e = bd.jPEvenMostrarEventos();
            jPEvenMostrarBusqueda(res_e);

        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }

        jPEvenInactivarBotones();
        sel_e = -1;
    }//GEN-LAST:event_jBEvenNuevoActionPerformed

    private void jBTarIniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarIniciarActionPerformed
          if (jTTareas.getSelectedRow() != -1) {
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro que desea iniciar la tarea: '" + nombre_tar + "' ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if (consulta == JOptionPane.OK_OPTION) {
                    director_tar = jTFTarDirector.getText();
                    if (director_tar.isEmpty()) {
                        //Aqui tenemos que sacar una ventana de Error
                        JOptionPane.showMessageDialog(jTPTareas, "Es necesario fijar un director para la tarea: '" + nombre_tar + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
                    } else {
                        try {
                            bd.procedureIniciarTarea(idt);
                            procResult = bd.getResultProcedure();
                            if (procResult == 1) {
                                jPTarObtenerTareas();
                            }
                            if (procResult == -1) {
                                JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no ha sido iniciada", "ERROR", JOptionPane.ERROR_MESSAGE);
                            }
                            if (procResult == -2) {
                                JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no tiene personal asignado", "AVISO", JOptionPane.WARNING_MESSAGE);
                            }
                            if (procResult == 0) {
                                JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no esta: ' En Espera de Inicio' o el proyecto no esta: 'En curso' ", "AVISO", JOptionPane.WARNING_MESSAGE);
                            }
                        } catch (SQLException ex) {
                            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna fila seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    //Comprobamos que el estado es: En espera de Inicio
}//GEN-LAST:event_jBTarIniciarActionPerformed

    private void jBTarFinalizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarFinalizarActionPerformed
      if (jTTareas.getSelectedRow() != -1) {
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro que desea finalizar la tarea: '" + nombre_tar + "' ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if (consulta == JOptionPane.OK_OPTION) {
                    bd.procedureFinalizarTarea(idt);
                    procResult = bd.getResultProcedure();
                    if (procResult == 1) {
                        jPTarObtenerTareas();
                    }
                    if (procResult == -1) {
                        JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no ha sido finalizada", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                    if (procResult == -2) {
                        JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no está: 'En curso'", "AVISO", JOptionPane.WARNING_MESSAGE);
                    }
                    if (procResult == 0) {
                        JOptionPane.showMessageDialog(jTPTareas, "No existe identificador para la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna fila seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
           
}//GEN-LAST:event_jBTarFinalizarActionPerformed

    private void jBTarEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarEliminarActionPerformed
       if (jTTareas.getSelectedRow() != -1) {
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro que desea eliminar la tarea: '" + nombre_tar + "' ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if (consulta == JOptionPane.OK_OPTION) {
                    bd.procedureEliminarTarea(idt);
                    procResult = bd.getResultProcedure();
                    if (procResult == 1) {
                        modelo_tareas.removeRow(sel);
                        jPTarLimpiarDatos();
                    }
                    if (procResult == -1) {
                        JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no ha sido eliminada", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                    if (procResult == -2) {
                        JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no está en 'Espera de Inicio' ", "AVISO", JOptionPane.WARNING_MESSAGE);
                    }
                    if (procResult == 0) {
                        JOptionPane.showMessageDialog(jTPTareas, "No existe identificador para la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna fila seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }      
    }//GEN-LAST:event_jBTarEliminarActionPerformed

    private void jBTarFinalizarVoluntarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarFinalizarVoluntarioActionPerformed
       if (jTTareas.getSelectedRow() != -1) {//Si esta seleccionada la tabla de tareas
            if (jTVoluntarios.getSelectedRow() != -1) { //Si esta seleccionada la tabla de Voluntarios
                try {
                    //Si esta seleccionada la tabla de Voluntarios
                    jPTarObtenerDatosFila();
                    jPTarObtenerIdtarea();
                    idt = Integer.valueOf(id_tar).intValue();
                    dni = jPTarObtenerDatosFilaVol();
                    consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro que desea finalizar al voluntario: '" + trabajador_tar + "' de la tarea:  '" + nombre_tar + "' ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if (consulta == JOptionPane.OK_OPTION) {
                        bd.procedureFinalizarPersonalTarea(idt, dni);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1) {
                            modelo_voluntarios.setValueAt(1, filav_tar, 0);
                            
                        }
                        if (procResult == -1) {
                            JOptionPane.showMessageDialog(jTPTareas, "El voluntario: '" + trabajador_tar + "' no ha finalizado su trabajo en la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                        if (procResult == 0) {
                            JOptionPane.showMessageDialog(jTPTareas, "La persona: '" + trabajador_tar + "' no trabaja en la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                    }
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                JOptionPane.showMessageDialog(jTPTareas, "No hay ningun voluntario seleccionado", "AVISO", JOptionPane.WARNING_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna tarea seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
                                                    
}//GEN-LAST:event_jBTarFinalizarVoluntarioActionPerformed

    private void jBTarAñadirVoluntarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarAñadirVoluntarioActionPerformed
       if (jTTareas.getSelectedRow() != -1) {
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                //Aqui tenemos que llamar a la ventana de personal y meterle el director.
                panel = 3;
                voluntariob_tar = true;
                JPanelSetVisible(jPPersonal);
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna fila seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_jBTarAñadirVoluntarioActionPerformed

    private void jBTarAñadirContratadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarAñadirContratadoActionPerformed
        if (jTTareas.getSelectedRow() != -1) {
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                panel = 3;  //Aqui tenemos que llamar a la ventana de personal y meterle el director.
                contratadob_tar = true;
                JPanelSetVisible(jPPersonal);
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna fila seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_jBTarAñadirContratadoActionPerformed

    private void jBTarFinalizarContratadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarFinalizarContratadoActionPerformed
         if (jTTareas.getSelectedRow() != -1) {//Si esta seleccionada la tabla de tareas
            if (jTContratados.getSelectedRow() != -1) { //Si esta seleccionada la tabla de Voluntarios
                try {
                    jPTarObtenerDatosFila();
                    jPTarObtenerIdtarea();
                    idt = Integer.valueOf(id_tar).intValue();
                    dni = jPTarObtenerDatosFilaCont();
                    consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro que desea finalizar al contratado: '" + trabajador_tar + "' de la tarea:  '" + nombre_tar + "' ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if (consulta == JOptionPane.OK_OPTION) {
                        bd.procedureFinalizarPersonalTarea(idt, dni);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1) {
                            modelo_contratados.setValueAt(1, filac_tar, 0);
                            
                        }
                        if (procResult == -1) {
                            JOptionPane.showMessageDialog(jTPTareas, "El contratado: '" + trabajador_tar + "' no ha finalizado su trabajo en la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                        if (procResult == 0) {
                            JOptionPane.showMessageDialog(jTPTareas, "La persona: '" + trabajador_tar + "' no trabaja en la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                    }
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                JOptionPane.showMessageDialog(jTPTareas, "No hay ningun contratado seleccionado", "AVISO", JOptionPane.WARNING_MESSAGE);
            }

        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna tarea seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
       
}//GEN-LAST:event_jBTarFinalizarContratadoActionPerformed

    private void jBTarAñadirGastoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarAñadirGastoActionPerformed
        String suma="0";
        sel=jTTareas.getSelectedRow();
        if (sel!= -1) {//Si esta seleccionada la tabla de tareas
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                showGastos();
                int resultado = jDG.getResultado();
                if (resultado == 1) {
                    jDG.LimpiarDatos();
                    gastos_tar = jDG.getCantidad();
                    detalle_tar = jDG.getDescripcion();
                    gastosf_tar = Float.valueOf(gastos_tar).intValue();
                    if (gastosf_tar > 0) {
                        suma=jPTarObtenerSumaGastos(idt);
                        float sumag=Float.valueOf(suma).floatValue();
                        if(presupuestof_tar<(sumag+gastosf_tar))
                                JOptionPane.showMessageDialog(jTPTareas, "El gasto: Cantidad '" + gastosf_tar + 
                                "'€ ,descripcion: '" + detalle_tar + "' no se ha añadido en la tarea: '" +
                                nombre_tar + "' al superar el presupuesto de: '" + presupuestof_tar +
                                "' €", "AVISO", JOptionPane.WARNING_MESSAGE);
                        else{//El presupuesto es mayor que los gastos mas la cantidad a añadir
                        
                        //Insertarmos el gasto si es positivo
                        bd.procedureAñadirGastoTarea(idt, gastosf_tar, detalle_tar);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1){
                            jPTarObtenerGastosTarea(idt);
                            jPTarObtenerTareas();
                            jTTareas.clearSelection();
                        }
                        else if (procResult == -1) 
                            JOptionPane.showMessageDialog(jTPTareas, "El gasto: Cantidad '" + gastosf_tar + "'€ ,descripcion: '" + detalle_tar + "' no se ha añadido en la tarea: '" + nombre_tar + "'", "ERROR", JOptionPane.ERROR_MESSAGE);
                
                        else if (procResult == 0)
                            JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no está: 'En curso'", "AVISO", JOptionPane.WARNING_MESSAGE);
                       
                       }   
                    }else {
                        JOptionPane.showMessageDialog(jTPTareas, "El gasto introducido no es una cantidad positiva", "AVISO", JOptionPane.WARNING_MESSAGE);
                    }
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna tarea seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_jBTarAñadirGastoActionPerformed

    private void jBTarEliminarGastoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarEliminarGastoActionPerformed
        if (jTTareas.getSelectedRow() != -1) {//Si esta seleccionada la tabla de tareas
            if (jTGastos.getSelectedRow() != -1) { //Si esta seleccionada la tabla de gastos 
                try {
                    jPTarObtenerDatosFila();
                    jPTarObtenerIdtarea();
                    idt = Integer.valueOf(id_tar).intValue();
                    idg = jPTarObtenerDatosFilaGastos();
                    consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro que desea eliminar  el gasto:  '" + detalle_tar + "' de cantidad: " + dinerof_tar + " € de la tarea:  " + nombre_tar + "?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if (consulta == JOptionPane.OK_OPTION) {
                        bd.procedureEliminarGastoTarea(idt,idg);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1) {
                            modelo_gastos.removeRow(filag_tar);
                            jPTarLimpiarDatos();
                            jPTarObtenerTareas();
                            jTTareas.clearSelection();
                        }
                        if (procResult == -1) {
                            JOptionPane.showMessageDialog(jTPTareas, "El gasto: '" + detalle_tar + "' de cantidad: " + dinerof_tar + " € de la tarea:  " + nombre_tar + " no ha sido eliminado", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                        if (procResult == 0) {
                            JOptionPane.showMessageDialog(jTPTareas, "No existe identificador para el gasto: '" + detalle_tar + "' de cantidad: " + dinerof_tar + " €", "ERROR", JOptionPane.ERROR_MESSAGE);
                        }
                    }
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                JOptionPane.showMessageDialog(jTPTareas, "No hay ningun gasto seleccionado", "AVISO", JOptionPane.WARNING_MESSAGE);
            }

        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna tarea seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_jBTarEliminarGastoActionPerformed

    private void jBTarNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarNuevoActionPerformed
        if (jTTareas.getSelectedRow() != -1) {
            jTTareas.clearSelection();
        }//Deseleccionamos las filas y columnas de la tabla
        jPTarLimpiarDatos();
        jPTarOcultarBotonesFormulario();
        jPTarOcultarBotonesTareas();
        jPTarOcultarBotonesPTarea();
        jPTarOcultarBotonesGTarea();
        jPTarLimpiarModeloTablas();
        jTContratados.updateUI();
        jTVoluntarios.updateUI();
        jTGastos.updateUI();
    }//GEN-LAST:event_jBTarNuevoActionPerformed

    private void jBTarGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarGuardarActionPerformed
       jPTarObtenerDatosFormulario();
        if (nombreb_tar & descripcionb_tar) {//Si no hay error al introducir los datos
            if (jTTareas.getSelectedRow() != -1) {//Vamos a editar
                try {       //Vamos a editar
                    jPTarObtenerIdtarea();
                    idt = Integer.valueOf(id_tar).intValue();
                    consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro de los datos a modificar? \n\t- Nombre: " + nombre_tar +
                            "\n\t- Presupuesto: " + presupuestof_tar + "€\n\t- Descripción: " + descripcion_tar + " ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if (consulta == JOptionPane.OK_OPTION) {
                        bd.procedureEditarTarea(idt, nombre_tar, descripcion_tar, presupuestof_tar);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1) {
                            jPTarObtenerTareas();
                        } else if (procResult == -1) {
                            JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no se ha modificado ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        } else if (procResult == 0) {
                            JOptionPane.showMessageDialog(jTPTareas, "No existe identificador para la tarea: '" + nombre_tar + "' ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        } else if (procResult == -2) {
                            JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' ya se ha finalizado o cancelado y no se puede modificar", "AVISO", JOptionPane.WARNING_MESSAGE);
                        }
                         else if (procResult == -3) {
                            JOptionPane.showMessageDialog(jTPTareas, "La tarea: 'Gestión del Proyecto' no se puede modificar", "AVISO", JOptionPane.WARNING_MESSAGE);
                        }
                         else if (procResult == -4) {
                            JOptionPane.showMessageDialog(jTPTareas, "El presupuesto: '" + presupuestof_tar + "' € provoca que se sobrepase la subvención del proyecto: '" + nombre_p + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
                        }
                         else if (procResult == -5) {
                            JOptionPane.showMessageDialog(jTPTareas, "El presupuesto: '" + presupuestof_tar + "' € es menor que los gastos de la tarea: '" +nombre_tar + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
                        }
                    }
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {//No hay tarea seleccionada, por lo que creamos una nueva tarea
                consulta = JOptionPane.showOptionDialog(jTPTareas, "¿Esta seguro de los datos a introducir? \n\t- Nombre: " + nombre_tar + "\n\t -Presupuesto: " +
                        presupuestof_tar + "€\n\t- Descripción: " + descripcion_tar + " ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if (consulta == JOptionPane.OK_OPTION) {
                    try {
                        bd.procedureCrearTarea(idp, nombre_tar, descripcion_tar, presupuestof_tar);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1) {
                            //System.out.println("La tarea es una mierda");
                            jPTarObtenerTareas();
                        } else if (procResult == -1) {
                            JOptionPane.showMessageDialog(jTPTareas, "La tarea: '" + nombre_tar + "' no se ha insertado ", "ERROR", JOptionPane.ERROR_MESSAGE);
                        } else if (procResult == -2) {
                            JOptionPane.showMessageDialog(jTPTareas, "El proyecto: '" + nombre_p +"' está finalizado o cancelado", "AVISO", JOptionPane.WARNING_MESSAGE);
                        }
                        else if (procResult == -3) {
                            JOptionPane.showMessageDialog(jTPTareas, "El presupuesto de la tarea: '" + nombre_tar + "'provoca que se sobrepase la subvención del proyecto: '"+ nombre_p +"'", "AVISO", JOptionPane.WARNING_MESSAGE);
                        }
                    
                        
                    } catch (Exception ex) {
                        Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }
            }
            jPTarOcultarBotonGuardar();
            jPTarOcultarBotonesTareas();
            jPTarOcultarBotonesPTarea();
            jPTarOcultarBotonesGTarea();
        } else if (!nombreb_tar) {
            JOptionPane.showMessageDialog(jTPTareas, "Introduzca un nombre para la tarea", "AVISO", JOptionPane.WARNING_MESSAGE);
        } else if (!descripcionb_tar) {
            JOptionPane.showMessageDialog(jTPTareas, "Introduzca una descripcion para la tarea: '" + nombre_tar + "' ", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
    
    }//GEN-LAST:event_jBTarGuardarActionPerformed

    private void jTTareasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTTareasMouseClicked
        try {
            jPTarMostrarDatosFormulario();
            jPTarActivarBotonesTareas();
            if (!estado_tar.equals("Finalizado")) {
                jPTarActivarBotonesPTarea();
                if (estado_tar.equals("En curso")) {
                    jPTarActivarBotonesGTarea();
                    jPTarActivarBotonFinalizar();
                    jPTarOcultarBotonIniciar();
                    jPTarOcultarBotonEliminar();
                } else if (estado_tar.equals("En espera de inicio")) {
                    jPTarActivarBotonEliminar();
                    jPTarOcultarBotonFinalizar();
                } else {
                    jPTarOcultarBotonesGTarea();
                    jPTarActivarBotonIniciar();
                    jPTarOcultarBotonFinalizar();
                }
            } else {
                jPTarOcultarBotonesPTarea();
                jPTarOcultarBotonesGTarea();
                jPTarOcultarBotonesTareas();
            }
            idt = Integer.valueOf(id_tar).intValue();
            modelo_gastos.getDataVector().clear();
            modelo_voluntarios.getDataVector().clear();
            modelo_contratados.getDataVector().clear();

            jTGastos.updateUI();
            jTContratados.updateUI();
            jTVoluntarios.updateUI();

            jPTarObtenerTrabajadorTarea(idt);
            jPTarObtenerGastosTarea(idt);
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_jTTareasMouseClicked

    private void jTFTarNombreKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFTarNombreKeyTyped
        jPTarActivarBotonesFormulario();
    }//GEN-LAST:event_jTFTarNombreKeyTyped

    private void jTFTarPresupuestoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFTarPresupuestoKeyTyped
        jPTarActivarBotonesFormulario();
    }//GEN-LAST:event_jTFTarPresupuestoKeyTyped

    private void jTFTarDirectorKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFTarDirectorKeyTyped
        jPTarActivarBotonesFormulario();
    }//GEN-LAST:event_jTFTarDirectorKeyTyped

    private void jTFTarDescripcionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFTarDescripcionKeyTyped
        jPTarActivarBotonesFormulario();
    }//GEN-LAST:event_jTFTarDescripcionKeyTyped

    private void jBTarFijarDirectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBTarFijarDirectorActionPerformed
       if (jTTareas.getSelectedRow() != -1) {
            try {
                jPTarObtenerDatosFila();
                jPTarObtenerIdtarea();
                idt = Integer.valueOf(id_tar).intValue();
                panel = 1;             //Aqui tenemos que llamar a la ventana de personal y meterle el director.
                JPanelSetVisible(jPPersonal);
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            JOptionPane.showMessageDialog(jTPTareas, "No hay ninguna fila seleccionada", "AVISO", JOptionPane.WARNING_MESSAGE);
        }   
}//GEN-LAST:event_jBTarFijarDirectorActionPerformed

    private void jBPersAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBPersAceptarActionPerformed
        if(fbaja!=null)
            JOptionPane.showMessageDialog(jTPTareas, "El personal seleccionado esta dado de baja", "AVISO", JOptionPane.WARNING_MESSAGE);
        else{
            if(panel==1){   //Vamos a Fijar director en tarea
                try {
                    JPanelSetVisible(jPProyectos);
                    director_tar = nombre + " " + ape1 + " " + ape2;
                    jTFTarDirector.setText(director_tar);
                    bd.procedureFijarDirector(idt, dni, jCBTarTipo.getSelectedItem().toString());
                } catch (SQLException ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
             }
        }
        else if(panel==2){  //Vamos a fijar Responsable en evento
            try {
                JPanelSetVisible(jPEventos);
                responsable_e = nombre + " " + ape1 + " " + ape2;
                bd.procedureFijarResponsable(id_e, dni);
                procResult = bd.getResultProcedure();
                if(procResult==1){
                    jTFEvenResponsable.setText(responsable_e);
                }else if(procResult==0){}
                else if(procResult==-1){}
            }catch (SQLException ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        else if(panel==3){
                 //Añadimos voluntarios y contratados en las tareas
                JPanelSetVisible(jPProyectos);
                trabajador_tar=nombre + " " + ape1 + " " + ape2;
                if(voluntariob_tar){
                    try {
                        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro que desea fijar a: " + trabajador_tar + " a la tarea: " + nombre_tar + " como voluntario ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                        if(consulta==JOptionPane.OK_OPTION){
                            voluntariob_tar = false;
                            jPTarAñadirPersonalTarea(1);
                        }
                    } catch (SQLException ex) {
                        Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (Exception ex) {
                        Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }
                else if(contratadob_tar){
                    try {
                        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro que desea fijar a: " + trabajador_tar + " a la tarea: " + nombre_tar + " como contratado ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                        if(consulta==JOptionPane.OK_OPTION){
                            contratadob_tar = false;
                            jPTarAñadirPersonalTarea(0);
                        }
                    } catch (SQLException ex) {
                        Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (Exception ex) {
                        Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }
            }
        else if(panel==5){     //fijamos responsable a proyecto
                try {
                    JPanelSetVisible(jPProyectos);
                    responsable_p = nombre + " " + ape1 + " " + ape2;
                    bd.procedureFijarResponsableProyecto(id_p, dni);
                    procResult = bd.getResultProcedure();
                    if(procResult==1){
                        jTFProyResponsable.setText(responsable_p);
                    }else if(procResult==0){
                    JOptionPane.showMessageDialog(jTPTareas, "No es posible Fijar Director en estado "+estado_p, "AVISO", JOptionPane.WARNING_MESSAGE);    
                    }else if(procResult==-1){
                    
                    }
                } catch (SQLException ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
        }
        panel = 0;
        
        }
    }//GEN-LAST:event_jBPersAceptarActionPerformed

    private void jBEvenGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEvenGuardarActionPerformed
        
     
        try {
            jPEvenObtenerDatos();
            boolean error = false;
            if (nombre_e.isEmpty()) {
                error = true;
                JOptionPane.showMessageDialog(jPEventos, "Introduzca el nombre del Evento ", "AVISO", JOptionPane.WARNING_MESSAGE);
            } else if (tipoi_e == 0) {//Si no hay  ningun tipo fijado
                error = true;
                JOptionPane.showMessageDialog(jPEventos, "Introduzca el tipo del Evento: '" + nombre_e + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
            } else if (lugar_e.isEmpty()) {
                error = true;
                JOptionPane.showMessageDialog(jPEventos, "Introduzca el lugar del Evento: '" + nombre_e + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
            } else if (duracion_e <= 0) {
                error = true;
                JOptionPane.showMessageDialog(jPEventos, "Introduzca una duración positiva para el Evento: '" + nombre_e + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
            } else if (fechaini_e.isEmpty()) {
                error = true;
                JOptionPane.showMessageDialog(jPEventos, "Introduzca la fecha de inicio para el Evento: '" + nombre_e + "'", "AVISO", JOptionPane.WARNING_MESSAGE);
            }

            if (!error) {
                if (sel_e == -1) {  //Vamos a crear un nuevo Evento
                    if (estadoi_e != 0) //Si el estado es distinto de: 'En Espera de Inicio
                    {
                        JOptionPane.showMessageDialog(jPEventos, "Debe fijar el estado del Evento: '" + nombre_e + "' a : 'En Espera de inicio'", "AVISO", JOptionPane.WARNING_MESSAGE);
                    } else {
                        consulta = JOptionPane.showOptionDialog(jPEventos, "Esta seguro de los datos a introducir:" +
                                "\n\t- Nombre: " + nombre_e + "\n\t- Tipo: " + tipos_e + "\n\t- Lugar: " + lugar_e + "\n\t- Duracion: " + duracion_e + " Dias " +
                                "\n\t- Fecha de Inicio: " + finicio_e + "\n\t- Fecha de Fin: " + ffin_e + "\n\t- Descripcion: " + descripcion_e, "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                        if (consulta == JOptionPane.OK_OPTION) {
                            bd.procedureCrearEvento(nombre_e, tipoi_e, lugar_e, duracion_e, finicio_e, ffin_e, descripcion_e);
                            procResult = bd.getResultProcedure();
                            if (procResult == 1) {
                                //System.out.println("Evento creado con exito");
                            } else {
                                JOptionPane.showMessageDialog(jPEventos, "Error al crear Evento " + nombre_e, "ERROR", JOptionPane.ERROR_MESSAGE);
                            }

                        }

                    }
                } else {
                    //estamos editando
                    if (estadoi_e < 2) {//Comprobamos que el evento no este finalizado ni cancelado
                       System.out.println("Estado: "+ estadoi_e);
                        consulta = JOptionPane.showOptionDialog(jPEventos, "Esta seguro de los datos a introducir:" +
                                "\n\t- Nombre: " + nombre_e + "\n\t- Tipo: " + tipos_e + "\n\t- Estado: " + estados_e + "\n\t- Lugar: " + lugar_e + "\n\t- Duracion: " + duracion_e + " Dias " +
                                "\n\t- Fecha de Inicio: " + finicio_e + "\n\t- Fecha de Fin: " + ffin_e + "\n\t- Descripcion: " + descripcion_e,
                                "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                        if (consulta == JOptionPane.OK_OPTION) {
                            bd.procedureEditarEvento(id_e, nombre_e, descripcion_e, tipoi_e, estados_e, lugar_e, duracion_e, finicio_e, ffin_e);
                            procResult = bd.getResultProcedure();
                            if (procResult == 1) {
                                //System.out.println("Evento editado correctamente");
                            } else {
                                //System.out.println("El resultado del procedimiento es: " + procResult);
                                JOptionPane.showMessageDialog(jPEventos, "Error al editar el Evento " + nombre_e, "ERROR", JOptionPane.ERROR_MESSAGE);
                            }
                        }
                    } else {
                        JOptionPane.showMessageDialog(jPEventos, "¡Parametro no Editable. Evento " + nombre_e + " finalizado o cancelado!", "AVISO", JOptionPane.WARNING_MESSAGE);
                    }
                }
                jPEvenMostrar();
            }
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ParseException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
       
    }//GEN-LAST:event_jBEvenGuardarActionPerformed

    private void jTEventosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTEventosMouseClicked
       jPEvenLimpiarFormulario();
        jPEvenActivarBotones();
        sel_e = jTEventos.getSelectedRow();
        jPEvenObtenerDatosFilaModelo();
        System.out.println("Estado de la fila:"+estados_e);
        try {//Falta obtener Descripcion y el responsable
            res_e = bd.jPEvenObtenerDatosFila(nombre_e, tipos_e,estados_e,lugar_e, duracion_e, finicio_e, ffin_e);
            jPEvenObtenerDescripcionRes(res_e);
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
        if (dniresponsable_e != null) {
            try {
                bd.procedureBuscarPersonalDNI(dniresponsable_e);
                procResult = bd.getResultProcedure();
                if (procResult == 1) {
                    res_e = bd.obtener_datosDni(dniresponsable_e);
                    jPEvenObtenerResponsable(res_e);
                } else if (procResult == 0) {
                }

            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        jPEvenRellenarFormulario();
    }//GEN-LAST:event_jTEventosMouseClicked

    private void jBEvenFijarResponsableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEvenFijarResponsableActionPerformed
         if (jTEventos.getSelectedRow() != -1) {
            try {
                //Aqui tenemos que llamar a la ventana de personal y meterle el responsable.
                panel = 2;
                JPanelSetVisible(jPPersonal);


                jPEvenMostrar();
            } catch (SQLException ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
}//GEN-LAST:event_jBEvenFijarResponsableActionPerformed

    private void jBEvenCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEvenCancelarActionPerformed
       if (jTEventos.getSelectedRow() != -1) {
            try {
                consulta = JOptionPane.showOptionDialog(jPEventos, "¿Confirma que desea cancelar el evento: " + nombre_e + "?", "CONFIRMACIÓN", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if (consulta == JOptionPane.OK_OPTION) {
                    bd.procedureCancelarEvento(id_e);
                    procResult = bd.getResultProcedure();
                    if (procResult == 1) {
                        jPEvenMostrar();
                        jCBEvenEstado.setSelectedIndex(3);
                    } else if (procResult == 0) {
                        //System.out.println("Error. El evento no se ha podido cancelar");
                    } else if (procResult == -1) {
                        //System.out.println("Error. El evento no existe");
                    }
                }
            } catch (SQLException ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_jBEvenCancelarActionPerformed

    private void jTFEvenNombreKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFEvenNombreKeyTyped
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jTFEvenNombreKeyTyped

    private void jCBEvenTipoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jCBEvenTipoKeyTyped
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jCBEvenTipoKeyTyped

    private void jCBEvenEstadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jCBEvenEstadoKeyTyped
        jPEvenActivar_guardar();
         jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jCBEvenEstadoKeyTyped

    private void jTFEvenDuracionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFEvenDuracionKeyTyped
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jTFEvenDuracionKeyTyped

    private void jFTFEvenFechaInicioKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jFTFEvenFechaInicioKeyTyped
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jFTFEvenFechaInicioKeyTyped

    private void jFTFEvenFechaFinKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jFTFEvenFechaFinKeyTyped
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jFTFEvenFechaFinKeyTyped

    private void jTAEvenDescripcionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTAEvenDescripcionKeyTyped
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
    }//GEN-LAST:event_jTAEvenDescripcionKeyTyped

    private void jBProyNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyNuevoActionPerformed
        jPProyLimpiar_formulario();
        jPProyMostrar();
        jPProyInactivarBotones();
    }//GEN-LAST:event_jBProyNuevoActionPerformed

    private void jBProyGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyGuardarActionPerformed
        try {
            jPProyObtenerDatosFormulario();
            id_categoria = bd.procedureObtenerIDcategoria(categoria_p);
            if (jTProyectos.getSelectedRow() == -1) {
                if(!nombre_p.equals("") && !descripcion_p.equals("")){
                    if(categoria_p==null)categoria_p="";
                    consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t- Nombre: "+nombre_p+"\n\t- Pais: "+pais_p+"\n\t- Categoria: "+categoria_p+"\n\t- Descripcion: "+descripcion_p, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if(consulta==JOptionPane.OK_OPTION){
                        bd.procedureCrearProyecto(nombre_p, descripcion_p, id_categoria, pais_p);
                        procResult = bd.getResultProcedure();
                        if (procResult == 1) {
                            jPProyMostrar();
                            id_p = bd.procedureObtenerIdProyecto();
                            bd.procedureCrearTareaInicial(id_p);
                            procResult = bd.getResultProcedure();
                            if (procResult == 1) { } //jPProyMostrar();//jPProyInactivarBotones();  
                            else if (procResult == -1) {}
                        }
                    }
                }
                else
                    JOptionPane.showMessageDialog(jTPTareas, "Debe rellenar los campos Nombre y Descripcion", "AVISO", JOptionPane.WARNING_MESSAGE);
            }else { //estamos editando
                consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t- Nombre: "+nombre_p+"\n\t- Pais: "+pais_p+"\n\t- Categoria: "+categoria_p+"\n\t- Descripcion: "+descripcion_p, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                if(consulta==JOptionPane.OK_OPTION){
                    bd.procedureEditarProyecto(id_p, id_categoria, nombre_p, descripcion_p,estadoindex_p, subvencion_p, pais_p);
                    procResult = bd.getResultProcedure();
                    if (procResult == 1)
                        jPProyMostrar();
                    else if (procResult == 0){}
                }
            }
            jTProyectos.clearSelection();
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBProyGuardarActionPerformed

    private void jBProyAñadirCategoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyAñadirCategoriaActionPerformed
        entradaDatos = JOptionPane.showInputDialog(jPProyectos, "CATEGORÍA", "ONGestiona", JOptionPane.PLAIN_MESSAGE);
        try {
            consulta = JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea añadir la Categoría " + entradaDatos , "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if (consulta == JOptionPane.OK_OPTION) {
                bd.procedureAñadirCategoria(entradaDatos);                                                     
                procResult = bd.getResultProcedure();
                if(procResult==1)
                    jPProyAsignarCategorias();
            }
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBProyAñadirCategoriaActionPerformed

    private void jBProyFijarResponsableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyFijarResponsableActionPerformed
        if(jTProyectos.getSelectedRow()!=-1){
            panel=5;
            JPanelSetVisible(jPPersonal);
        }
    }//GEN-LAST:event_jBProyFijarResponsableActionPerformed

    private void jBProyCambiarEstadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyCambiarEstadoActionPerformed
        if(jTProyectos.getSelectedRow()!=-1){
            String nuevo_estado=jCBProyEstado.getSelectedItem().toString();
                if(!estado_p.equals(nuevo_estado)){
                    if(!estado_p.equals("Finalizado") && !estado_p.equals("Cerrado")){
                    if(estado_p.equals("Pendiente de envio")){
                        if(nuevo_estado.equals("Pendiente de aprobacion")){
                            try {
                                consulta = JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea pasar del estado " + estado_p + " al estado " + nuevo_estado, "ONGestiona", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                                if (consulta == JOptionPane.OK_OPTION) {
                                    bd.procedureEnviarProyecto(id_p);
                                    procResult = bd.getResultProcedure();
                                    if (procResult == 1){
                                        jPProyMostrar();
                                    }
                                    else if (procResult == -1){
                                        //System.out.println("Actualizacion Fallida");
                                    }
                                }
                             }catch (SQLException ex) {
                                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                        }     }
                        else
                            JOptionPane.showMessageDialog(jTPTareas, "No se puede pasar del estado "+estado_p+" al estado "+nuevo_estado, "ERROR", JOptionPane.ERROR_MESSAGE);
                    }else if(estado_p.equals("Pendiente de aprobacion")){
                        if(nuevo_estado.equals("Aprobado")){
                             consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea pasar del estado "+estado_p+" al estado "+nuevo_estado, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                             if(consulta==JOptionPane.OK_OPTION){
                                try {
                                    entradaDatos = JOptionPane.showInputDialog(jPProyectos, "SUBVENCION", "ONGestiona", JOptionPane.PLAIN_MESSAGE);
                                    subvencion_p = Float.valueOf(entradaDatos);
                                    bd.procedureAprobarProyecto(id_p, subvencion_p);
                                    procResult = bd.getResultProcedure();
                                    if (procResult == 1){
                                        jPProyMostrar();
                                        modelo_proyecto.setValueAt(subvencion_p,sel, 2);
                                        jTFProySubvencion.setText(entradaDatos);
                                        
                                    } 
                                    else if (procResult == -1) {
                                        //System.out.println("Actualizacion Fallida");
                                    }
                                    else if (procResult == 0) {
                                        //System.out.println("");
                                    }
                                } catch (SQLException ex) {
                                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                }
                             }
                        }else if(nuevo_estado.equals("Denegado")){
                             consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea pasar del estado "+estado_p+" al estado "+nuevo_estado, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                             if(consulta==JOptionPane.OK_OPTION){
                                try {
                                    bd.procedureDenegarProyecto(id_p);
                                    procResult = bd.getResultProcedure();
                                    if (procResult == 1) {
                                        jPProyMostrar();
                                    } else if (procResult == -1) {
                                        //System.out.println("Actualizacion Fallida");
                                    } else if (procResult == 0) {
                                        //System.out.println("");
                                    }
                                } catch (SQLException ex) {
                                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                }
                             }
                        }
                        else
                            JOptionPane.showMessageDialog(jTPTareas, "No se puede pasar del estado "+estado_p+" al estado "+nuevo_estado, "ERROR", JOptionPane.ERROR_MESSAGE);
                   }else if(estado_p.equals("Denegado")){
                       if(nuevo_estado.equals("Pendiente de aprobacion")){
                                consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea pasar del estado "+estado_p+" al estado "+nuevo_estado, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                                if(consulta==JOptionPane.OK_OPTION){
                                try {
                                    bd.procedureEnviarProyecto(id_p);
                                    procResult = bd.getResultProcedure();
                                    if (procResult == 1) {
                                        jPProyMostrar();
                                    } 
                                    else if (procResult == -1) {
                                        //System.out.println("Actualizacion Fallida");
                                    }
                                } catch (SQLException ex) {
                                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                }
                                }
                            }
                            else
                                JOptionPane.showMessageDialog(jTPTareas, "No se puede pasar del estado "+estado_p+" al estado "+nuevo_estado, "ERROR", JOptionPane.ERROR_MESSAGE);
                    }else if(estado_p.equals("Aprobado")){
                        if(nuevo_estado.equals("En curso")){
                            consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea pasar del estado "+estado_p+" al estado "+nuevo_estado, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                            if(consulta==JOptionPane.OK_OPTION){
                                try {
                                    if (dniresponsable_p.isEmpty()) {
                                        JOptionPane.showMessageDialog(jTPTareas, "Falta fijar responsable del proyecto", "AVISO", JOptionPane.WARNING_MESSAGE);
                                    } else {
                                        bd.procedureIniciarProyecto(id_p);
                                        procResult = bd.getResultProcedure();
                                    if (procResult == 1){
                                        jPProyMostrar();
                                    } 
                                    else if (procResult == -1) {
                                        //System.out.println("Actualizacion Fallida");
                                    } else if (procResult == 0) {
                                        //System.out.println("");
                                    }
                                    }
                                    
                                } catch (SQLException ex) {
                                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                }
                             }
                        }
                        else
                           JOptionPane.showMessageDialog(jTPTareas, "No se puede pasar del estado "+estado_p+" al estado "+nuevo_estado, "ERROR", JOptionPane.ERROR_MESSAGE);
                    }else if(estado_p.equals("En curso")){
                        if(nuevo_estado.equals("Finalizado")){
                            consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea Finalizar el proyecto "+nombre_p, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                            if(consulta==JOptionPane.OK_OPTION){
                                try {
                                    bd.procedureFinalizarProyecto(id_p);
                                    procResult = bd.getResultProcedure();
                                    if (procResult == 1) {
                                        jPProyMostrar();
                                    } else if (procResult == -1) {
                                    //    System.out.println("Actualizacion Fallida");
                                    } else if (procResult == 0) {
                                        JOptionPane.showMessageDialog(jTPTareas, "Este proyecto tiene alguna tarea que aun no ha Finalizado", "AVISO", JOptionPane.WARNING_MESSAGE);
                                    }
                                } catch (SQLException ex) {
                                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                }
                            }
                        }else if(nuevo_estado.equals("Cerrado")){
                            consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea Cerrar el proyecto "+nombre_p, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                            if(consulta==JOptionPane.OK_OPTION){
                                try {
                                    bd.procedureCerrarProyecto(id_p);
                                    procResult = bd.getResultProcedure();
                                    if (procResult == 1) {
                                        jPProyMostrar();
                                    } else if (procResult == -1) {
                                        //System.out.println("Actualizacion Fallida");
                                    } else if (procResult == 0) {
                                        //System.out.println("No hace nada");
                                    }
                                } catch (SQLException ex) {
                                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                }
                            }
                        }
                        else
                            JOptionPane.showMessageDialog(jTPTareas, "No se puede pasar del estado "+estado_p+" al estado "+nuevo_estado, "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                    }
                    else
                        JOptionPane.showMessageDialog(jTPTareas, "No se puede cambiar de estado", "ERROR", JOptionPane.ERROR_MESSAGE);
                }       
        }
    }//GEN-LAST:event_jBProyCambiarEstadoActionPerformed

    private void jBProyEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyEliminarActionPerformed
        if(jTProyectos.getSelectedRow()!=-1){
            consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro  que desea eliminar el proyecto "+nombre_p, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if(consulta==JOptionPane.OK_OPTION){
                try {
                    bd.procedureEliminarProyecto(id_p);
                    procResult = bd.getResultProcedure();
                    if (procResult == 1) {
                        jPProyMostrar();
                        jPProyLimpiar_formulario();
                        jPProyInactivarBotones();
                    } else if (procResult == -1) {
                    }
                } catch (SQLException ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
                
             }
         }
    }//GEN-LAST:event_jBProyEliminarActionPerformed

    private void jTFProyNombreKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFProyNombreKeyTyped
        jPProyActivarBotones();
    }//GEN-LAST:event_jTFProyNombreKeyTyped

    private void jTFProyPaisKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFProyPaisKeyTyped
        jPProyActivarBotones();
    }//GEN-LAST:event_jTFProyPaisKeyTyped

    private void jTAProyDescripcionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTAProyDescripcionKeyTyped
        jPProyActivarBotones();
    }//GEN-LAST:event_jTAProyDescripcionKeyTyped

    private void jTFProySubvencionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFProySubvencionKeyTyped
        jPProyActivarBotones();
    }//GEN-LAST:event_jTFProySubvencionKeyTyped

    private void jBEvenBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEvenBuscarActionPerformed
         try {
            jPEvenObtenerDatos();
            //Tenemos que buscar por los campos "Nombre", "Fecha" y "Lugar";
            // "SELECT IDtarea,Nombre,Estado,Fecha_inicio,Fecha_fin,Presupuesto FROM tarea WHERE IDproyecto='" +id_proyecto + "'  ;");
            String c = "SELECT * FROM evento WHERE ";
            if (!nombre_e.isEmpty()) {
                c = c + "Nombre='" + nombre_e + "' ";
            }
            if (!lugar_e.isEmpty()) {
                if (!nombre_e.isEmpty()) {
                    c = c + "AND ";
                }
                c = c + "Lugar='" + lugar_e + "'";
            }
            if (!fechaini_e.isEmpty()) {
                if (!nombre_e.isEmpty() || !lugar_e.isEmpty()) {
                    c = c + "AND ";
                }
                c = c + "Fecha_inicio='" + fechaini_e + "'";
            }
            bd.query(c);
            res_e = (ResultSet) bd.getResultSentence();
            int nfilas = jPEvenMostrarBusqueda(res_e);
            if (nfilas == 0) {
                JOptionPane.showMessageDialog(jPEventos, "¡No se encontró ninguna coincidencia!", "AVISO", JOptionPane.WARNING_MESSAGE);
            }
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBEvenBuscarActionPerformed

    private void jTFPersDireccionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersDireccionKeyTyped
                jPPersonalActivarBotones();
    }//GEN-LAST:event_jTFPersDireccionKeyTyped

    private void jFTFPersFechaNacimientoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jFTFPersFechaNacimientoKeyTyped
                 jPPersonalActivarBotones();
    }//GEN-LAST:event_jFTFPersFechaNacimientoKeyTyped

private void jTBDonacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBDonacionesActionPerformed
        JPanelSetVisible (jPDonativos);
        jCBMostrarAnonimos.setSelected(false);
        MostrarDonativos();
        limpiarFormularioDonativos();
}//GEN-LAST:event_jTBDonacionesActionPerformed

private void jTBONGActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBONGActionPerformed
        JPanelSetVisible (jPONG);
}//GEN-LAST:event_jTBONGActionPerformed

private void jTFEvenLugarKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFEvenLugarKeyTyped
    jPEvenActivar_guardar();
    jPEvenActivar_buscar();
    jPEvenActivar_nuevo();
}//GEN-LAST:event_jTFEvenLugarKeyTyped

private void jBONGLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBONGLimpiarActionPerformed
    jPONGLimpiarFormulario();
}//GEN-LAST:event_jBONGLimpiarActionPerformed

private void jIFLoginKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jIFLoginKeyPressed
               
}//GEN-LAST:event_jIFLoginKeyPressed

private void jBProyBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProyBuscarActionPerformed
    jPProyObtenerDatosFormulario();
        if(!nombre_p.equals("") || !pais_p.equals("") ||!descripcion_p.equals("") ){
            try {
                String con = "SELECT * FROM proyecto WHERE ";
                if (!nombre_p.equals(""))
                    con += "Nombre='" + nombre_p + "'";
                if (!pais_p.equals("")) {
                    if (nombre_p.equals(""))
                        con += " Pais='" + pais_p + "'";
                    else
                        con += " AND Pais='" + pais_p + "'";
                }
                if (!descripcion_p.equals("")) {
                    if (nombre_p.equals("") && pais_p.equals(""))
                        con += " Descripcion='" + descripcion_p + "'";
                    else
                        con += " AND Descripcion='" + descripcion_p + "'";
                }
                con += ";";
                res_p= bd.buscarProyectos(con);
                jPProyMostrarProyectos(res_p);
                if(nproyectos==0){
                    JOptionPane.showMessageDialog(jPPersC, "No existen coincidencias en la busqueda", "AVISO", JOptionPane.WARNING_MESSAGE);
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }else{
            JOptionPane.showMessageDialog(jPPersC, "Debe rellenar algún campo para iniciar la búsqueda", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
}//GEN-LAST:event_jBProyBuscarActionPerformed

private void jTFSocDNIKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocDNIKeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocDNIKeyTyped

private void jTFSocNombreKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocNombreKeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocNombreKeyTyped

private void jTFSocApellido1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocApellido1KeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocApellido1KeyTyped

private void jTFSocApellido2KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocApellido2KeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocApellido2KeyTyped

private void jTFSocTelefonoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocTelefonoKeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocTelefonoKeyTyped

private void jTFSocDireccionKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocDireccionKeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocDireccionKeyTyped

private void jTFSocEmailKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocEmailKeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocEmailKeyTyped

private void jFTFSocFechaNacKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jFTFSocFechaNacKeyTyped
activarBotonesControlSocio();
}//GEN-LAST:event_jFTFSocFechaNacKeyTyped

private void jTFSocCuotaKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocCuotaKeyTyped
// TODO add your handling code here:
        activarBotonesControlSocio();
}//GEN-LAST:event_jTFSocCuotaKeyTyped

private void jCBSocPeriodicidadMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jCBSocPeriodicidadMouseClicked
activarBotonesControlSocio();
        jButtonBuscar.setEnabled(false); // No realizamos busqueda por este campo
}//GEN-LAST:event_jCBSocPeriodicidadMouseClicked

private void jTFSocBancoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocBancoKeyPressed
activarBotonesControlSocio();
        jButtonBuscar.setEnabled(false); // No realizamos busqueda por este campo
        if(jTFSocBanco.getText().length() > 4)
            jTFSocBanco.setText(jTFSocBanco.getText().substring(0,4));
}//GEN-LAST:event_jTFSocBancoKeyPressed

private void jTFSocOficinaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocOficinaKeyPressed
activarBotonesControlSocio();
        jButtonBuscar.setEnabled(false); // No realizamos busqueda por este campo
        if(jTFSocOficina.getText().length() > 4)
            jTFSocOficina.setText(jTFSocOficina.getText().substring(0,4));
}//GEN-LAST:event_jTFSocOficinaKeyPressed

private void jTFSocCuentaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocCuentaKeyPressed
activarBotonesControlSocio();
        jButtonBuscar.setEnabled(false); // No realizamos busqueda por este campo
        if(jTFSocCuenta.getText().length() > 10)
            jTFSocCuenta.setText(jTFSocCuenta.getText().substring(0,10));
}//GEN-LAST:event_jTFSocCuentaKeyPressed

private void jTFSocDCKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocDCKeyPressed
activarBotonesControlSocio();
        jButtonBuscar.setEnabled(false); // No realizamos busqueda por este campo
        if(jTFSocDC.getText().length() > 2)
            jTFSocDC.setText(jTFSocDC.getText().substring(0,2));
}//GEN-LAST:event_jTFSocDCKeyPressed

private void jRBSocPagoTransferenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRBSocPagoTransferenciaActionPerformed
cambiarTransferencia();
}//GEN-LAST:event_jRBSocPagoTransferenciaActionPerformed

private void jRBSocPagoEfectivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRBSocPagoEfectivoActionPerformed
cambiarEfectivo();
        jButtonGuardar.setEnabled(true);
}//GEN-LAST:event_jRBSocPagoEfectivoActionPerformed

private void jButtonNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNuevoActionPerformed
// TODO add your handling code here:
        limpiarFormularioSocios();
        jTSocSocios.clearSelection(); //Deseleccionamos las filas y columnas de la tabla
        
        // Para que muestre solo los activos
        jCheckBoxMostrar.setSelected(false);
        jPSocMostrar();
}//GEN-LAST:event_jButtonNuevoActionPerformed

private void jButtonBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBuscarActionPerformed
// Para que muestre todas las busquedas que haya
        jCheckBoxMostrar.setSelected(true);
        
        dni_s=jTFSocDNI.getText();
        nsocios = 0;
        jPSocObtenerDatosFormulario();
        if(!dni_s.equals("") || !nombre_s.equals("") || !ape1_s.equals("") || !ape2_s.equals("") || !tlf_s.equals("")
                || !email_s.equals("") || !dir_s.equals("")|| !jFTFSocFechaNac.getText().isEmpty()
                || !jTFSocCuota.getText().equals("") || !per_s.equals("") || !forma_pago_s.equals("")){
            try {
                String con = "SELECT s.personal_DNI, p.Nombre, p.Apellido1, p.Apellido2, s.Cuota, s.Perioricidad," +
                        " s.Fecha_baja FROM socio s, personal p WHERE p.DNI = s.personal_Dni";
                if (!dni_s.equals(""))
                    con += " AND s.personal_DNI='" + dni_s + "'";
                if (!nombre_s.equals("")) {
                    con += " AND p.Nombre='" + nombre_s + "'";
                }
                if (!ape1_s.equals("")) {
                    con += " AND p.Apellido1='" + ape1_s + "'";
                }
                if (!ape2_s.equals("")) {
                    con += " AND p.Apellido2='" + ape2_s + "'";
                }
                if (!tlf_s.equals("")) {
                    con += " AND p.Telefono='" + tlf_s + "'";
                }
                if (!email_s.equals("")) {
                    con += " AND p.Email='" + email_s + "'";
                }
                if (!dir_s.equals("")) {
                    con += " AND p.direccion='" + dir_s + "'";
                }
                if (!jTFSocCuota.getText().equals("")) {
                    con += " AND s.cuota=" + cuota_s;
                }
                if (!jFTFSocFechaNac.getText().isEmpty()) {
                    con += " AND p.Fecha_nacimiento='" + fnacimiento_s + "'";
                }
                con += ";";
                res = bd.buscarSocio(con);
           
                jPSocMostrarSocios(res);
                
                if(nsocios==0){
                    JOptionPane.showMessageDialog(jPPersC, "No existen coincidencias en la busqueda", "AVISO", JOptionPane.WARNING_MESSAGE);
                }
            } catch (Exception ex) {
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }else{
            JOptionPane.showMessageDialog(jPPersC, "Debe rellenar algún campo para iniciar la búsqueda", "AVISO", JOptionPane.WARNING_MESSAGE);
        }
}//GEN-LAST:event_jButtonBuscarActionPerformed

private void jButtonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGuardarActionPerformed
        String socio="";
          boolean todobien = true;
          if(jTSocSocios.getSelectedRow() == -1){ //No hemos seleccionado nada, estamos insertando
              if(jTFSocCuota.getText().isEmpty() || jTFSocDNI.getText().isEmpty() || jTFSocNombre.getText().isEmpty()
                    || jTFSocApellido1.getText().isEmpty() || jTFSocApellido2.getText().isEmpty()){

                JOptionPane.showMessageDialog(jPPersC, "Debe rellenar los campos dni, nombre, apellido1, apellido2 y cuota",
                        "AVISO", JOptionPane.WARNING_MESSAGE);
              }
              else{
                    if (!jFTFSocFechaNac.getText().isEmpty()){
                        if(!comprobarFecha(jFTFSocFechaNac.getText())){           
                            JOptionPane.showMessageDialog(jPPersC, "Fecha de nacimiento mal introducida -> Formato: YYYY-MM-DD",
                              "AVISO", JOptionPane.WARNING_MESSAGE);
                            todobien = false;
                            
                        }
                   }

                   if (!comprobarFloat(jTFSocCuota.getText())){
                            JOptionPane.showMessageDialog(jPPersC, "Debe meter un numero real en cuota",
                           "AVISO", JOptionPane.WARNING_MESSAGE);                   
                            todobien = false;
                   }
                   if (todobien){
                        jPSocObtenerDatosFormulario();
                        dni_s = jTFSocDNI.getText();
                   }
                    if (validarDNI(dni_s) == 0){
                        JOptionPane.showMessageDialog(jPPersC, "El DNI es incorrecto: introduzca 8 digitos seguido de una letra en mayusucla",
                           "AVISO", JOptionPane.WARNING_MESSAGE);                   
                            todobien = false;
                    }

                    if(todobien && cuota_s <= 0){
                         JOptionPane.showMessageDialog(jPPersC, "La cuota introducida no es correcta,  debe introducir una cantidad positiva",
                           "AVISO", JOptionPane.WARNING_MESSAGE);
                         todobien = false;
                    }

                    //Si he seleccionado el pago por transferencia, los datos de la cuenta bancaria han de ser correctos
                    if (jRBSocPagoTransferencia.isSelected() &&
                           !comprobarDatosBancarios(jTFSocBanco.getText(), jTFSocOficina.getText(), jTFSocDC.getText(), jTFSocCuenta.getText())){
                           JOptionPane.showMessageDialog(jPPersC, "Los Datos bancarios introducidos son incorrectos",
                           "AVISO", JOptionPane.WARNING_MESSAGE);
                           todobien = false;
                    }

                    if (todobien){
                           consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro que desea hacer socio a :\n\t-"+nombre_s+"\n\t-"+ape1_s+"\n\t-"+ape2_s+" ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                           if(consulta==JOptionPane.OK_OPTION){
                              try{
                                socio = bd.obtenerEstadoSocio(dni_s);
                                
                              }catch (Exception ex) {
                                Logger.getLogger(ONGestionaApp.class.getName()).log(Level.SEVERE, null, ex);
                              }

                              if(socio.equals("No existe")){
                                  try{   
                                    bd.procedureAltaPersonal(dni_s, nombre_s, ape1_s, ape2_s, tlf_s, email_s, dir_s, fnacimiento_s);
                                    procResult = bd.getResultProcedure();

                                    if(procResult == -1){
                                        JOptionPane.showMessageDialog(jPPersC, "Fallo en alta personal",
                                        "AVISO", JOptionPane.WARNING_MESSAGE);
                                    }

                                    else 
                                          bd.registrarAltaSocio(dni_s, cuota_s, per_s, forma_pago_s, datos_bancarios_s);



                                  }catch (Exception ex) {
                                        Logger.getLogger(ONGestionaApp.class.getName()).log(Level.SEVERE, null, ex);
                                  }                                                     
                              }//if no existe

                              else if(socio.equals("Inactivo")){
                                  try{
                                    bd.modificarFechaBaja(dni_s);
                                  }catch (Exception ex) {
                                        Logger.getLogger(ONGestionaApp.class.getName()).log(Level.SEVERE, null, ex);
                                  } 
                              }//Si socio inactivo

                              else{
                                     JOptionPane.showMessageDialog(jPPersC, "El socio ya está dado de alta",
                                        "AVISO", JOptionPane.WARNING_MESSAGE); 
                              }
                              jPSocMostrar();
                              
                              
                             }//fin si hemos dicho que si
                            }//else luego preguntamos si se desea introducir datos
                }// else despues de si estan todos los campos metidos
        }//fin de insertar

        else{ //caso editar
               dni_nuevo_s = jTFSocDNI.getText();

               try{
                    socio = bd.obtenerEstadoSocio(dni_s);  
                    
                }catch (Exception ex) {
                        Logger.getLogger(ONGestionaApp.class.getName()).log(Level.SEVERE, null, ex);}

               if(socio.equals("Inactivo")){
                      JOptionPane.showMessageDialog(jPPersC, "Socio dado de baja",
                                "AVISO", JOptionPane.WARNING_MESSAGE);
               }

               else if(socio.equals("Activo")){
                   if(jTFSocCuota.getText().isEmpty() || jTFSocDNI.getText().isEmpty() || jTFSocNombre.getText().isEmpty()
                    || jTFSocApellido1.getText().isEmpty() || jTFSocApellido2.getText().isEmpty()){

                        JOptionPane.showMessageDialog(jPPersC, "Debe rellenar los campos dni, nombre, apellido1, apellido2 y cuota",
                            "AVISO", JOptionPane.WARNING_MESSAGE);
                   }
                   if (!jFTFSocFechaNac.getText().isEmpty()){
                        if(!comprobarFecha(jFTFSocFechaNac.getText())){
                            JOptionPane.showMessageDialog(jPPersC, "Fecha de nacimiento mal introducida -> Formato: YYYY-MM-DD",
                            "AVISO", JOptionPane.WARNING_MESSAGE);
                            todobien = false;
                        }
                   }
                   
                   if (!comprobarFloat(jTFSocCuota.getText())){
                        JOptionPane.showMessageDialog(jPPersC, "Debe introducir un numero real en cuota",
                            "AVISO", JOptionPane.WARNING_MESSAGE);
                        todobien = false;
                   }
                   if (todobien)
                        jPSocObtenerDatosFormulario();
                   if(todobien && cuota_s <= 0)
                           JOptionPane.showMessageDialog(jPPersC, "La cuota introducida no es correcta,  debe introducir una cantidad positiva",
                        "AVISO", JOptionPane.WARNING_MESSAGE);
                   if (validarDNI(dni_nuevo_s) == 0){
                        JOptionPane.showMessageDialog(jPPersC, "El DNI es incorrecto: introduzca 8 digitos seguido de una letra en mayusucla",
                           "AVISO", JOptionPane.WARNING_MESSAGE);                   
                            todobien = false;
                    }
                   
                   if (jRBSocPagoTransferencia.isSelected() &&
                        !comprobarDatosBancarios(jTFSocBanco.getText(), jTFSocOficina.getText(), jTFSocDC.getText(), jTFSocCuenta.getText())){
                        JOptionPane.showMessageDialog(jPPersC, "Los Datos bancarios introducidos son incorrectos",
                          "AVISO", JOptionPane.WARNING_MESSAGE);
                        todobien = false;
                   }
                   if (todobien) {
                      consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir:\n\t-"+dni_s+"\n\t-"+nombre_s+"\n\t-"+ape1_s+"\n\t-"+ape2_s+"\n\t-"+tlf_s+"\n\t-"+email_s+"\n\t-"+forma_pago_s+"\n\t-"+cuota_s+"\n\t-"+per_s+" ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                        
                        if(consulta==JOptionPane.OK_OPTION){
                            try{
                              bd.procedureEditarPersonal(dni_s, dni_nuevo_s, nombre_s, ape1_s, ape2_s, tlf_s, email_s, dir_s, fnacimiento_s);
                              bd.registrarEdicionSocio(dni_s, dni_nuevo_s, cuota_s, per_s, forma_pago_s, datos_bancarios_s);
                              jPSocMostrar(); // Mostramos todo
                            }catch (Exception ex) {Logger.getLogger(ONGestionaApp.class.getName()).log(Level.SEVERE, null, ex);}   
                        }//if
                  }//if todo bien
                }//Si socio es activo

           }//Fin de editar
}//GEN-LAST:event_jButtonGuardarActionPerformed

private void jButtonBajaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBajaActionPerformed
// TODO add your handling code here:
                
//        dni = "'1'";
//        String aaa = "10-10-1000";       // TOKETEO VARIABLES PARA COMPROBACIONES, BORRARLO!!!!
//        fbaja_s = Date.valueOf(aaa);
        
        if(fbaja_s==null){//damos de baja
            consulta=JOptionPane.showOptionDialog(jPPersC, "¿Esta seguro que desea dar de baja al socio "+nombre_s+" "+ape1_s+" "+ape2_s+" ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if(consulta==JOptionPane.OK_OPTION){
                try {
                    bd.registrarBajaSocio(dni_s);
                    jPSocMostrar();
                    limpiarFormularioSocios();
                    
                    //bd.procedureBajaPersonal(dni);
                    //procResult = bd.getResultProcedure();
                    /*if(procResult==1){
                        res=(ResultSet) bd.mostrar_personal(estado);
                        jPPersonalMostrarBusqueda(res);
                     } else if(procResult==-2){
                        JOptionPane.showMessageDialog(jPPersC, "Esta persona es Responsable de un evento o Director de un proyecto.\n No se puede dar de baja.", "AVISO", JOptionPane.WARNING_MESSAGE);
                     }*/
                  }catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                  }
               }
        }else if(fbaja_s!=null){
            consulta=JOptionPane.showOptionDialog(jPPersC, "¿Esta seguro que desea dar de Alta a "+nombre_s+" "+ape1_s+" "+ape2_s+" ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
            if(consulta==JOptionPane.OK_OPTION){
                try {
                    bd.modificarFechaBaja(dni_s);
                    fbaja_s = null;
                    jPSocMostrar();
                    limpiarFormularioSocios();
                    
                    //bd.renovar_alta(dni);
                    //res = (ResultSet) bd.mostrar_personal(estado);
                    //jPPersonalMostrarBusqueda(res);
                } catch (Exception ex) {
                    Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
      }
}//GEN-LAST:event_jButtonBajaActionPerformed

private void jTFSocCantidadKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFSocCantidadKeyTyped
// Activar botón pagar
        jButtonPagar.setEnabled(true);
}//GEN-LAST:event_jTFSocCantidadKeyTyped

private void jFTFSocFechaPagoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jFTFSocFechaPagoKeyTyped
// Activar botón pagar
        jButtonPagar.setEnabled(true);
}//GEN-LAST:event_jFTFSocFechaPagoKeyTyped

private void jButtonPagarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPagarActionPerformed
// TODO add your handling code here:
            
        if (jFTFSocFechaPago.getText().isEmpty() || jTFSocCantidad.getText().isEmpty())
            JOptionPane.showMessageDialog(jPPersC, "Introduzca Fecha de pago y cantidad",
                      "AVISO", JOptionPane.WARNING_MESSAGE);
        else{
            if (!comprobarFecha(jFTFSocFechaPago.getText()))
                JOptionPane.showMessageDialog(jPPersC, "Fecha de pago mal introducida -> Formato: YYYY-MM-DD",
                      "AVISO", JOptionPane.WARNING_MESSAGE);
            else if (!comprobarFloat(jTFSocCantidad.getText()))
                JOptionPane.showMessageDialog(jPPersC, "Debe introducir un numero real en Cantidad",
                      "AVISO", JOptionPane.WARNING_MESSAGE);
            else {
                fpago_s = Date.valueOf(jFTFSocFechaPago.getText());
                Calendar c = new GregorianCalendar(); 
                String diaa, mees, aannio;
                diaa = Integer.toString(c.get(Calendar.DATE));
                mees = Integer.toString(c.get(Calendar.MONTH));
                aannio = Integer.toString(c.get(Calendar.YEAR));
                String f_actual = aannio+"-"+mees+"-"+diaa;
                Date fechaactual = Date.valueOf(f_actual);
                String socio = "";

                try{
                    socio = bd.obtenerEstadoSocio(dni_s);
                }
                catch (Exception ex){
                }

                if (socio.equals("Inactivo")){ // Si socio dado de baja
                    JOptionPane.showMessageDialog(jPPersC, "El socio del cual quiere insertar el pago esta dado de baja",
                            "AVISO", JOptionPane.WARNING_MESSAGE);
                }
                // Si socio activo miramos si esta bien la cantidad y la fecha de pago
                if (socio.equals("Activo")){
                    if (0.0 >= Float.parseFloat(jTFSocCantidad.getText())){ 
                       JOptionPane.showMessageDialog(jPPersC, "Esta introduciendo una cantidad menor o igual a 0",
                            "AVISO", JOptionPane.WARNING_MESSAGE);
                    }
                    else if (fpago_s.before(fechaactual)){
                            JOptionPane.showMessageDialog(jPPersC, "La fecha del pago es anterior a la actual",
                            "AVISO", JOptionPane.WARNING_MESSAGE);
                    }
                    else{

                       consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir al dni " +dni_s+":\n\t-Cantidad: "+jTFSocCantidad.getText()+"\n\t-F.Pago"+fpago_s, "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);

                       if(consulta==JOptionPane.OK_OPTION){
                           try{
                               int i = bd.registrarPagoSocio(dni_s, Float.parseFloat(jTFSocCantidad.getText()), fpago_s);
                               if (i == -2)
                                   JOptionPane.showMessageDialog(jPPersC, "Este socio ya realizó un pago en esa fecha",
                                           "AVISO", JOptionPane.WARNING_MESSAGE);
                               
                               jPSocPagosMostrar(dni_s);
                               
                           }catch(Exception ex){
                           }
                       }
                    }
                }
            }//fin else, si esta bien introducida la fecha pago
        }// Si no esta ni fecha nacimento ni cantidad vacio
}//GEN-LAST:event_jButtonPagarActionPerformed

private void jTSocSociosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTSocSociosMouseClicked
try {
            sel = jTSocSocios.getSelectedRow();
            dni_s = (String) modelo_socios.getValueAt(sel, 1);
            nombre_s = (String) modelo_socios.getValueAt(sel, 2);
            ape1_s = (String) modelo_socios.getValueAt(sel, 3);
            ape2_s = (String) modelo_socios.getValueAt(sel, 4);
            String cuota_string = modelo_socios.getValueAt (sel, 5).toString();
            cuota_s =Float.valueOf(cuota_string);
            per_s = (String) modelo_socios.getValueAt(sel, 6);
            
                        
            limpiarFormularioSocios();
            
            //desactivarBotonesControlSocio();
            jButtonBaja.setEnabled(true);
            jButtonNuevo.setEnabled(true);
            
            // Cogemos los datos de socios
            res_soc = (ResultSet) bd.obtenerDatosSocios(dni_s);
            if (res_soc.next()) {
                datos_bancarios_s = (String) res_soc.getObject("Datos_bancarios");
                falta_s = (Date) res_soc.getDate("Fecha_alta");
                fbaja_s = (Date) res_soc.getDate("Fecha_baja");
                forma_pago_s = (String) res_soc.getObject("Forma_pago");
            }
            
            // Cogemos los datos de personal
            res_soc = (ResultSet) bd.obtenerDatosPersonalSocios(dni_s);
            if(res_soc.next()){
                fnacimiento_s = res_soc.getDate ("Fecha_nacimiento");
                tlf_s = (String) res_soc.getObject("Telefono");
                dir_s = (String) res_soc.getObject ("direccion");
                email_s = (String) res_soc.getObject ("email");
            }
            
            
              
            
            
            // Activamos botones pagos  
            jTFSocCantidad.setEditable(true);
            jFTFSocFechaPago.setEditable(true);

            // Enseñar sus pagos
            jPSocPagosMostrar(dni_s);
            
            jTFSocDNI.setText(dni_s);
            jTFSocNombre.setText(nombre_s);
            jTFSocApellido1.setText(ape1_s);
            jTFSocApellido2.setText(ape2_s);
            
            if(fnacimiento_s == null)
                jFTFSocFechaNac.setText("");
            else
                jFTFSocFechaNac.setText(fnacimiento_s.toString());


            

            jTFSocTelefono.setText(tlf_s);
            jTFSocDireccion.setText(dir_s);
            jTFSocEmail.setText(email_s);
            jTFSocCuota.setText(cuota_string);
            
            if(per_s.equals("Semanal"))
                jCBSocPeriodicidad.setSelectedIndex(0);
            else{
                if(per_s.equals("Quincenal"))
                    jCBSocPeriodicidad.setSelectedIndex(1);
                else{
                    if(per_s.equals("Mensual"))
                        jCBSocPeriodicidad.setSelectedIndex(2);
                    else{
                        if(per_s.equals("Trimestral"))
                            jCBSocPeriodicidad.setSelectedIndex(3);
                        else{
                            jCBSocPeriodicidad.setSelectedIndex(4);
                        }
                    }
                
                }
            }
            
            // Cambiar colocar botón efectivo
            if(forma_pago_s.equals("Efectivo"))
                cambiarEfectivo();
            else{
                cambiarTransferencia();
                
                String subBanco = datos_bancarios_s.substring(0,4);
                String subOficina = datos_bancarios_s.substring(4,8);
                String subDC = datos_bancarios_s.substring(8,10);
                String subCuenta = datos_bancarios_s.substring(10,20);
                
                jTFSocBanco.setText(subBanco);
                jTFSocOficina.setText(subOficina);
                jTFSocDC.setText(subDC);
                jTFSocCuenta.setText(subCuenta);
            
            }
            
            // Activar botón alta/baja
            jButtonBaja.setEnabled(true);
            
            cambiarIconoBaja();
            
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_jTSocSociosMouseClicked

private void jCheckBoxMostrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxMostrarActionPerformed
jPSocMostrar();
}//GEN-LAST:event_jCheckBoxMostrarActionPerformed

private void jBPagarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBPagarActionPerformed

    //Cogiendo la fecha en f_actual
    Calendar c = new GregorianCalendar(); 

    String dia, mes, annio;
    dia = Integer.toString(c.get(Calendar.DATE));
    mes = Integer.toString(c.get(Calendar.MONTH));
    annio = Integer.toString(c.get(Calendar.YEAR));

    String f_actual_string = annio+"-"+mes+"-"+dia;

    Date f_actual = Date.valueOf(f_actual_string);


    boolean todobien = true;

    if (jTFCantidad.getText().isEmpty() || jTFFechaPago.getText().isEmpty()){    
            JOptionPane.showMessageDialog(jTPTareas, 
            "Debe introducir al menos Cantidad y Fecha pago", "AVISO", JOptionPane.WARNING_MESSAGE);
            todobien = false;
    }
    else{ // Si meto los dos campos cantidaid y fecha
            if(!comprobarFloat(jTFCantidad.getText())){
                    JOptionPane.showMessageDialog(jTPTareas, 
                    "La cantidad introducida no es correcta, debe introducir una cantidad positiva", "AVISO", JOptionPane.WARNING_MESSAGE);    
                    todobien = false;
            }
            if(!comprobarFecha(jTFFechaPago.getText())){
                    JOptionPane.showMessageDialog(jTPTareas, 
                    "Fecha de pago mal introducida -> Formato: YYYY-MM-DD", "AVISO", JOptionPane.WARNING_MESSAGE);    
                    todobien = false;
            }
            if (todobien)
                    jPDonObtenerDatosFormulario();
            if(todobien && cantidad_d <= 0){
                    JOptionPane.showMessageDialog(jTPTareas, 
                    "La cantidad introducida no es correcta, debe introducir una cantidad positiva", "AVISO", JOptionPane.WARNING_MESSAGE);    
                    todobien = false;
            }
            if(todobien && fpago_d.before(f_actual)){
                    JOptionPane.showMessageDialog(jTPTareas, "La fecha de pago introducida no es correcta. Debe introducir una fecha de pago igual o posterior a la fecha actual", "AVISO", JOptionPane.WARNING_MESSAGE);    
                    todobien = false;
             
            }
            if (!jTFDNI.getText().isEmpty()){
                if (todobien && validarDNI(dni_d) == 0){
                        JOptionPane.showMessageDialog(jPPersC, "El DNI es incorrecto: introduzca 8 digitos seguido de una letra en mayusucla",
                           "AVISO", JOptionPane.WARNING_MESSAGE);                   
                            todobien = false;
                }
            }
            if (todobien){
                    consulta=JOptionPane.showOptionDialog(jPPersC, "¿Esta seguro que desea realizar el pago de "+cantidad_d+" euros ?", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
                    if(consulta==JOptionPane.OK_OPTION){
                            if(!jTFDNI.getText().isEmpty()){
                                    try{
                                            bd.procedureBuscarPersonalDNI(dni_d);
                                            procResult = bd.getResultProcedure();
                                            if (procResult == 1){  // Existe
                                                    bd.registrarDonativo(cantidad_d, fpago_d, dni_d);
                                                    jCBMostrarAnonimos.setSelected(false);
                                                    MostrarDonativos();
                                            }
                                            else{ // No existe, crearlo
                                                    if (jTFNombre.getText().isEmpty() || jTFApellido1.getText().isEmpty() || jTFApellido2.getText().isEmpty() )    
                                                            JOptionPane.showMessageDialog(jTPTareas, 
                                                            "Para una donacion No anónima, debe introducir aparte del DNI: nombre, Apellido1 y Apellido2", "AVISO", JOptionPane.WARNING_MESSAGE);
                                                    else{
                                                            bd.procedureAltaPersonal(dni_d, nombre_d, ape1_d, ape2_d, null, null, null, null);
                                                            bd.procedureBajaPersonal(dni_d);
                                                            bd.registrarDonativo(cantidad_d, fpago_d, dni_d);
                                                            jCBMostrarAnonimos.setSelected(false);
                                                            MostrarDonativos();
                                                            
                                                    }
                                            }
                                    }catch (Exception ex) {
                                            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                    }
                            }	
                            else{
                                    try{
                                            bd.registrarDonativo(cantidad_d, fpago_d, "null");
                                            jCBMostrarAnonimos.setSelected(true);
                                            MostrarDonativosNulos();
                                            
                                    }catch (Exception ex) {
                                            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
                                    }
                            }// else
                    }//OK option
            }// else GAAANSO
    }
}//GEN-LAST:event_jBPagarActionPerformed

private void jCBMostrarAnonimosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBMostrarAnonimosActionPerformed
if(jCBMostrarAnonimos.isSelected())
        MostrarDonativosNulos();
    else
        MostrarDonativos();
}//GEN-LAST:event_jCBMostrarAnonimosActionPerformed

private void jBONGGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBONGGuardarActionPerformed
// TODO add your handling code here:
   
    direccion_o = jTFONGDireccion.getText();
    email_o = jTFONGEmail.getText();
    tlf_o = jTFONGTelefono.getText();
    logo_o = jTFONGLogo.getText();
    descripcion_o = jTAONGDescripcion.getText();
    
    if (jTFONGDireccion.getText().isEmpty() || jTFONGTelefono.getText().isEmpty()
            || jTFONGLogo.getText().isEmpty())
            JOptionPane.showMessageDialog(jPPersC, "Debe rellenar como minimo los campos: Direccion, Telefono y Logo",
                        "AVISO", JOptionPane.WARNING_MESSAGE);
    else{   
        consulta=JOptionPane.showOptionDialog(jPPersC, "Esta seguro de los datos a introducir :\n\t-ong\n\t-"+direccion_o+"\n\t-"+tlf_o+" ", "ONGestiona", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, option, option[0]);
        if(consulta==JOptionPane.OK_OPTION){
            try{
               bd.procedureActualizarOng(direccion_o, tlf_o, email_o, descripcion_o, logo_o);
            }catch(SQLException ex){
                Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    
    
    }
}//GEN-LAST:event_jBONGGuardarActionPerformed

private void jTFPersLoginKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTFPersLoginKeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jTFPersLoginKeyTyped

private void jPFPersPasswordKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPFPersPasswordKeyTyped
            jPPersonalActivarBotones();
}//GEN-LAST:event_jPFPersPasswordKeyTyped

private void jCBPersPerfilItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCBPersPerfilItemStateChanged
            jPPersonalActivarBotones();
}//GEN-LAST:event_jCBPersPerfilItemStateChanged

private void jCBEvenEstadoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCBEvenEstadoItemStateChanged
        jPEvenActivar_guardar();
        jPEvenActivar_buscar();
        jPEvenActivar_nuevo();
}//GEN-LAST:event_jCBEvenEstadoItemStateChanged

    private void jTProyectosMouseClicked(java.awt.event.MouseEvent evt){                                         
        jPProyLimpiar_formulario();
        try {
            sel = jTProyectos.getSelectedRow();
            jPProyObtenerDatosModelo(); //obtenemos nombre y subvencion 
            jPProyObtenerDatosProyectoModelo();
            jPProyRellenarFormulario();
            
            jBProyCambiarEstado.setEnabled(true);
            jBProyAñadirImagen.setEnabled(true);
            jBProyFijarResponsable.setEnabled(true);
            
            jBProyEliminar.setEnabled(true);
            jBProyNuevo.setEnabled(true);
            jBProyBuscar.setEnabled(true);
            
            if(estado_p.equals("Pendiente de aprobacion"))
                jBProyEliminar.setEnabled(true);
            else
                jBProyEliminar.setEnabled(false);
            if(estado_p.equals("Aprobado"))
                jTFProySubvencion.setEnabled(true);
            else jTFProySubvencion.setEnabled(false);
            
            jPTarObtenerTareas();
            
        } catch (SQLException ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(ONGestionaView.class.getName()).log(Level.SEVERE, null, ex);
        }
              
    }

    private void JPanelSetVisible (javax.swing.JPanel p) {
        
        jPMain.removeAll();
        
        if (p.getName().equals("jPProyectos")) {
            jPMain.add(jPProyectos, java.awt.BorderLayout.CENTER);
            jPProyectos.setVisible(true);
        }
        if (p.getName().equals("jPPersonal")) {
            jPMain.add(jPPersonal, java.awt.BorderLayout.CENTER);
            jPPersonal.setVisible(true);
        }
            
        if (p.getName().equals("jPEventos")) {
            jPMain.add(jPEventos, java.awt.BorderLayout.CENTER);
            jPEventos.setVisible(true);
    }
        if (p.getName().equals("jPSocios")) {
            jPMain.add(jPSocios, java.awt.BorderLayout.CENTER);
            jPSocios.setVisible(true);
        }   
        
        if (p.getName().equals("jPDonativos")) {
            jPMain.add(jPDonativos, java.awt.BorderLayout.CENTER);
            jPDonativos.setVisible(true);
        }
        
        if (p.getName().equals("jPONG")) {
            jPMain.add(jPONG, java.awt.BorderLayout.CENTER);
            jPONG.setVisible(true);
        }
        
        jPMain.add(jSeparator1, java.awt.BorderLayout.NORTH);
        
        jPMain.updateUI();
       
    }
    

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel Abajo_panel;
    private javax.swing.JPanel Arriba_panel;
    private javax.swing.JPanel Botones_panel;
    private javax.swing.JLabel Categoria_label;
    private javax.swing.JPanel Categoria_panel;
    private javax.swing.JLabel Categoriap_label;
    private javax.swing.JPanel Central_panel;
    private javax.swing.JPanel Centro_arriba_panel;
    private javax.swing.JPanel Centrop_panel;
    private javax.swing.JButton Consultar_button1;
    private javax.swing.JLabel Contratados_label;
    private javax.swing.JPanel Contratados_panel;
    private javax.swing.JPanel Ctareas_panel;
    private javax.swing.JTextArea Curriculum_text1;
    private javax.swing.JPanel Derecha_panel;
    private javax.swing.JLabel Descripcion_label;
    private javax.swing.JPanel Descripcion_panel;
    private javax.swing.JLabel Descripcionp_label;
    private javax.swing.JPanel Descripcionp_panel;
    private javax.swing.JLabel Estadop_label;
    private javax.swing.JPanel Formulario_panel;
    private javax.swing.JLabel Gastos_label;
    private javax.swing.JPanel Gastos_panel;
    private javax.swing.JPanel Imagenes_panel;
    private javax.swing.JLabel Imagenesp_label1;
    private javax.swing.JPanel Izquierda_panell;
    private javax.swing.JLabel Nombrep_panel;
    private javax.swing.JPanel Nortep_panel;
    private javax.swing.JPanel Ntareas_panel;
    private javax.swing.JLabel Paisp_label;
    private javax.swing.JPanel Rellenar_campos_panel;
    private javax.swing.JPanel Responsable_panel;
    private javax.swing.JLabel Responsablep_label;
    private javax.swing.JPanel Separador_panel;
    private javax.swing.JPanel Stareas_panel;
    private javax.swing.JLabel Voluntarios_label;
    private javax.swing.JPanel Voluntarios_panel;
    private javax.swing.JPanel centro_abajo_panel;
    private javax.swing.JButton jBAceptar;
    private javax.swing.JButton jBBorrar;
    private javax.swing.JButton jBEvenBuscar;
    private javax.swing.JButton jBEvenCancelar;
    private javax.swing.JButton jBEvenFijarResponsable;
    private javax.swing.JButton jBEvenGuardar;
    private javax.swing.JButton jBEvenNuevo;
    private javax.swing.ButtonGroup jBGToolbar;
    private javax.swing.JButton jBONGGuardar;
    private javax.swing.JButton jBONGLimpiar;
    private javax.swing.JButton jBPagar;
    private javax.swing.JButton jBPersAceptar;
    private javax.swing.JButton jBPersBaja;
    private javax.swing.JButton jBPersBuscar;
    private javax.swing.JButton jBPersGuardar;
    private javax.swing.JButton jBPersNuevo;
    private javax.swing.JButton jBProyAñadirCategoria;
    private javax.swing.JButton jBProyAñadirImagen;
    private javax.swing.JButton jBProyBuscar;
    private javax.swing.JButton jBProyCambiarEstado;
    private javax.swing.JButton jBProyEliminar;
    private javax.swing.JButton jBProyEliminarCategoria;
    private javax.swing.JButton jBProyEliminarImagen;
    private javax.swing.JButton jBProyFijarResponsable;
    private javax.swing.JButton jBProyGuardar;
    private javax.swing.JButton jBProyNuevo;
    private javax.swing.JButton jBTarAñadirContratado;
    private javax.swing.JButton jBTarAñadirGasto;
    private javax.swing.JButton jBTarAñadirVoluntario;
    private javax.swing.JButton jBTarEliminar;
    private javax.swing.JButton jBTarEliminarGasto;
    private javax.swing.JButton jBTarFijarDirector;
    private javax.swing.JButton jBTarFinalizar;
    private javax.swing.JButton jBTarFinalizarContratado;
    private javax.swing.JButton jBTarFinalizarVoluntario;
    private javax.swing.JButton jBTarGuardar;
    private javax.swing.JButton jBTarIniciar;
    private javax.swing.JButton jBTarNuevo;
    private javax.swing.JButton jButtonBaja;
    private javax.swing.JButton jButtonBuscar;
    private javax.swing.JButton jButtonGuardar;
    private javax.swing.JButton jButtonNuevo;
    private javax.swing.JButton jButtonPagar;
    private javax.swing.JComboBox jCBEvenEstado;
    private javax.swing.JComboBox jCBEvenTipo;
    private javax.swing.JCheckBox jCBMostar;
    private javax.swing.JCheckBox jCBMostrarAnonimos;
    private javax.swing.JComboBox jCBPersPerfil;
    private javax.swing.JComboBox jCBProyCategoria;
    private javax.swing.JComboBox jCBProyCategoria2;
    private javax.swing.JComboBox jCBProyEstado;
    private javax.swing.JComboBox jCBSocPeriodicidad;
    private javax.swing.JComboBox jCBTarTipo;
    private javax.swing.JCheckBox jCheckBoxMostrar;
    private javax.swing.JFormattedTextField jFTFEvenFechaFin;
    private javax.swing.JFormattedTextField jFTFEvenFechaInicio;
    private javax.swing.JFormattedTextField jFTFPersFechaNacimiento;
    private javax.swing.JFormattedTextField jFTFSocFechaNac;
    private javax.swing.JFormattedTextField jFTFSocFechaPago;
    private javax.swing.JInternalFrame jIFLogin;
    private javax.swing.JLabel jLApellido1;
    private javax.swing.JLabel jLApellido2;
    private javax.swing.JLabel jLBDescripcion;
    private javax.swing.JLabel jLBDireccion;
    private javax.swing.JLabel jLBEmail;
    private javax.swing.JLabel jLBLogo;
    private javax.swing.JLabel jLBNombre;
    private javax.swing.JLabel jLBTelefono;
    private javax.swing.JLabel jLCantidad;
    private javax.swing.JLabel jLDNI;
    private javax.swing.JLabel jLEvenDescripcion;
    private javax.swing.JLabel jLEvenDuracion;
    private javax.swing.JLabel jLEvenEstado;
    private javax.swing.JLabel jLEvenFechaFin;
    private javax.swing.JLabel jLEvenFechaInicio;
    private javax.swing.JLabel jLEvenLugar;
    private javax.swing.JLabel jLEvenNombre;
    private javax.swing.JLabel jLEvenResponsable;
    private javax.swing.JLabel jLEvenTipo;
    private javax.swing.JLabel jLFechaPago;
    private javax.swing.JLabel jLLogin;
    private javax.swing.JLabel jLNombre;
    private javax.swing.JLabel jLONGDireccion;
    private javax.swing.JLabel jLONGEmail;
    private javax.swing.JLabel jLONGImagen;
    private javax.swing.JLabel jLONGImagen1;
    private javax.swing.JLabel jLONGLogo;
    private javax.swing.JLabel jLONGNombre;
    private javax.swing.JLabel jLONGTelefono;
    private javax.swing.JLabel jLPersApellido1;
    private javax.swing.JLabel jLPersApellido2;
    private javax.swing.JLabel jLPersDireccion;
    private javax.swing.JLabel jLPersDni;
    private javax.swing.JLabel jLPersEmail;
    private javax.swing.JLabel jLPersFechaAlta;
    private javax.swing.JLabel jLPersFechaBaja;
    private javax.swing.JLabel jLPersFechaNacimiento;
    private javax.swing.JLabel jLPersLogin;
    private javax.swing.JLabel jLPersNombre;
    private javax.swing.JLabel jLPersPassword;
    private javax.swing.JLabel jLPersPerfil;
    private javax.swing.JLabel jLPersTelefono;
    private javax.swing.JLabel jLProyImagen;
    private javax.swing.JLabel jLProySubvencion;
    private javax.swing.JLabel jLSocApellido1;
    private javax.swing.JLabel jLSocApellido2;
    private javax.swing.JLabel jLSocBanco;
    private javax.swing.JLabel jLSocCantidad;
    private javax.swing.JLabel jLSocCuenta;
    private javax.swing.JLabel jLSocCuota;
    private javax.swing.JLabel jLSocDC;
    private javax.swing.JLabel jLSocDNI;
    private javax.swing.JLabel jLSocDireccion;
    private javax.swing.JLabel jLSocEmail;
    private javax.swing.JLabel jLSocFechaNac;
    private javax.swing.JLabel jLSocFechaPago;
    private javax.swing.JLabel jLSocFormaPago;
    private javax.swing.JLabel jLSocNombre;
    private javax.swing.JLabel jLSocOficina;
    private javax.swing.JLabel jLSocPeriodicidad;
    private javax.swing.JLabel jLSocTelefono;
    private javax.swing.JLabel jLTarDirector;
    private javax.swing.JLabel jLTarNombre;
    private javax.swing.JLabel jLTarPresupuesto;
    private javax.swing.JLabel jLTarTipo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPBienvenida;
    private javax.swing.JPanel jPDatosONG;
    private javax.swing.JPanel jPDatosPago;
    private javax.swing.JPanel jPDonaciones;
    private javax.swing.JPanel jPDonativos;
    private javax.swing.JPanel jPEvenC;
    private javax.swing.JPanel jPEvenE;
    private javax.swing.JPanel jPEvenS;
    private javax.swing.JPanel jPEventos;
    private javax.swing.JPasswordField jPFPassword;
    private javax.swing.JPasswordField jPFPersPassword;
    private javax.swing.JPanel jPFormulario;
    private javax.swing.JPanel jPLogin;
    private javax.swing.JPanel jPMain;
    private javax.swing.JPanel jPONG;
    private javax.swing.JPanel jPPersC;
    private javax.swing.JPanel jPPersCurriculum;
    private javax.swing.JPanel jPPersFormulario;
    private javax.swing.JPanel jPPersMostar;
    private javax.swing.JPanel jPPersN;
    private javax.swing.JPanel jPPersS;
    private javax.swing.JPanel jPPersonal;
    private javax.swing.JPanel jPProyS;
    private javax.swing.JPanel jPProyectos;
    private javax.swing.JPanel jPSocios;
    private javax.swing.JPanel jPToolbar;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanelBanco;
    private javax.swing.JPanel jPanelControl;
    private javax.swing.JPanel jPanelDatos;
    private javax.swing.JPanel jPanelPago;
    private javax.swing.JRadioButton jRBSocPagoEfectivo;
    private javax.swing.JRadioButton jRBSocPagoTransferencia;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPaneDonativos;
    private javax.swing.JScrollPane jScrollPaneSocios;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JScrollPane jSocContenedorPagos;
    private javax.swing.JPanel jSocCuota;
    private javax.swing.JPanel jSocPago;
    private javax.swing.JPanel jSocPersona;
    private javax.swing.JTextArea jTAEvenDescripcion;
    private javax.swing.JTextArea jTAONGDescripcion;
    private javax.swing.JTextArea jTAProyDescripcion;
    private javax.swing.JToggleButton jTBDonaciones;
    private javax.swing.JToggleButton jTBEventos;
    private javax.swing.JToggleButton jTBONG;
    private javax.swing.JToggleButton jTBPersonal;
    private javax.swing.JToggleButton jTBProyectos;
    private javax.swing.JToggleButton jTBSocios;
    private javax.swing.JTable jTContratados;
    private javax.swing.JTable jTDonativos;
    private javax.swing.JTable jTEventos;
    private javax.swing.JTextField jTFApellido1;
    private javax.swing.JTextField jTFApellido2;
    private javax.swing.JTextField jTFBDescripcion;
    private javax.swing.JTextField jTFBDireccion;
    private javax.swing.JTextField jTFBEmail;
    private javax.swing.JTextField jTFBNombre;
    private javax.swing.JTextField jTFBTelefono;
    private javax.swing.JTextField jTFCantidad;
    private javax.swing.JTextField jTFDNI;
    private javax.swing.JTextField jTFEvenDuracion;
    private javax.swing.JTextField jTFEvenLugar;
    private javax.swing.JTextField jTFEvenNombre;
    private javax.swing.JTextField jTFEvenResponsable;
    private javax.swing.JTextField jTFFechaPago;
    private javax.swing.JTextField jTFNombre;
    private javax.swing.JTextField jTFONGDireccion;
    private javax.swing.JTextField jTFONGEmail;
    private javax.swing.JTextField jTFONGLogo;
    private javax.swing.JTextField jTFONGNombre;
    private javax.swing.JTextField jTFONGTelefono;
    private javax.swing.JTextField jTFPersApellido1;
    private javax.swing.JTextField jTFPersApellido2;
    private javax.swing.JTextField jTFPersDireccion;
    private javax.swing.JTextField jTFPersDni;
    private javax.swing.JTextField jTFPersEmail;
    private javax.swing.JFormattedTextField jTFPersFechaAlta;
    private javax.swing.JFormattedTextField jTFPersFechaBaja;
    private javax.swing.JTextField jTFPersLogin;
    private javax.swing.JTextField jTFPersNombre;
    private javax.swing.JTextField jTFPersTelefono;
    private javax.swing.JTextField jTFProyNombre;
    private javax.swing.JTextField jTFProyPais;
    private javax.swing.JTextField jTFProyResponsable;
    private javax.swing.JTextField jTFProySubvencion;
    private javax.swing.JTextField jTFSocApellido1;
    private javax.swing.JTextField jTFSocApellido2;
    private javax.swing.JTextField jTFSocBanco;
    private javax.swing.JTextField jTFSocCantidad;
    private javax.swing.JTextField jTFSocCuenta;
    private javax.swing.JTextField jTFSocCuota;
    private javax.swing.JTextField jTFSocDC;
    private javax.swing.JTextField jTFSocDNI;
    private javax.swing.JTextField jTFSocDireccion;
    private javax.swing.JTextField jTFSocEmail;
    private javax.swing.JTextField jTFSocNombre;
    private javax.swing.JTextField jTFSocOficina;
    private javax.swing.JTextField jTFSocTelefono;
    private javax.swing.JTextArea jTFTarDescripcion;
    private javax.swing.JTextField jTFTarDirector;
    private javax.swing.JTextField jTFTarNombre;
    private javax.swing.JTextField jTFTarPresupuesto;
    private javax.swing.JTextField jTFUsuario;
    private javax.swing.JTable jTGastos;
    private javax.swing.JTabbedPane jTPPers;
    private javax.swing.JTabbedPane jTPProyC;
    private javax.swing.JPanel jTPProyectos;
    private javax.swing.JPanel jTPTareas;
    private javax.swing.JTable jTPersonal;
    private javax.swing.JTable jTProyectos;
    private javax.swing.JTable jTSocPagos;
    private javax.swing.JTable jTSocSocios;
    private javax.swing.JTable jTTareas;
    private javax.swing.JTable jTVoluntarios;
    private javax.swing.JTabbedPane jTabbedSocio;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    // End of variables declaration//GEN-END:variables

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;

    private JDialog aboutBox;
    private ONGestionaGastos jDG;
}